NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

1
1

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's gravatar image

rdrey
21112
accept rate: 0%


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.

permanent link

answered 09 Jul '11, 22:15

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263

question asked: 09 Jul '11, 21:39

question was seen: 8,279 times

last updated: 09 Jul '11, 23:20

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum