Hi I followed the guide http://weait.com/content/build-your-own-openstreetmap-server on both an Ubuntu server and my Mac, nice guide. The guide includes how to set SRID 900913 on the PostGIS database, and mapnik seems to default to this, too. This might be a nooby question for people from a GIS background, but when I first did some queries on the data, the output confused me a lot and only once I figured out ST_Transform(way,94326) it made sense (and gave me latitude / longitude values I find useful). Why is the data not stored in WGS84 (94326) by default? Are there accuracy considerations? Or is it just a convention adopted by tile renderers like Mapnik, since the map projection is probably 900913? asked 09 Jul '11, 21:39 rdrey |
In the central OSM database, data is indeed stored in EPSG:4326, and the same is true if you load our data into a non-rendering-optimised database e.g. with Osmosis. Only osm2pgsql and, by extension, our Mapnik style default to spherical Mercator because that's what is required for tile rendering, and not having to reproject data when rendering tiles gives a performance benefit. answered 09 Jul '11, 22:15 Frederik Ramm ♦ thanks! Makes sense. I should probably follow an osmosis guide the next time!
(09 Jul '11, 22:52)
rdrey
I should have added that you can use the -l (ell) parameter with osm2pgsql and it will generate EPSG:4326 geometries.
(09 Jul '11, 23:20)
Frederik Ramm ♦
|