You are not logged in.

#1 2021-12-31 17:04:13

Flatus O'Flaherty
Member
Registered: 2021-12-31
Posts: 1

Projection of download openstreetmap with GPS traces and POIs

Hello, Merry Xmas !!!
Please could you tell me what the is best way to use a down loaded open street map image with python proj?

I am presuming that openstreetmap uses EPSG:3857 as mentioned on WIKI, but the coordinate points look nothing like those should on the web page and dont fit to EPSG:4326 properly.

Alternatively, I'd need to build my own conversion formula sad

Thank you !!!

Here's an excerpt from my code:

    # EPSG:3857 is a Spherical Mercator projection coordinate system popularized by web services such as Google and later OpenStreetMap.
    # EPSG:4326 WGS 84 -- WGS84 - World Geodetic System 1984, used in GPS

    # proj = pyproj.Transformer.from_crs(4326, 27700, always_xy=True)
    # proj = pyproj.Transformer.from_crs(3857, 27700, always_xy=True)
    # y_data_GPS_4, x_data_GPS_4 = proj.transform(y_data_GPS_4, x_data_GPS_4)
    from pyproj import Proj, transform
    # inProj = Proj(init='epsg:3857')
    # outProj = Proj(init='epsg:4326')
    inProj = Proj(init='epsg:4326')
    outProj = Proj(init='epsg:3857')
    # x1,y1 = -11705274.6374,4826473.6922
    # x2,y2 = transform(inProj,outProj,x1,y1)
    y_data_GPS_4, x_data_GPS_4 = transform(inProj,outProj,y_data_GPS_4, x_data_GPS_4)
    # print x2,y2
As can be seen in the image below, the GPS trace does not align properly on the image:
view?usp=sharing

Offline

Board footer

Powered by FluxBB