Hello, I recently installed postgres and loaded some osm data in it. I'm trying to do some queries (for example getting all street names, street numbers, etc ..). Can anyone help me with some documentation about postgres query with osm ? i'm looking for any tutorial able to get me started on how to query the database Thanks for you help asked 10 Mar '12, 17:53 Hyboga |
Here is the schema of Osm2pgsql: http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema it contains one example and documentation of the table structure. answered 16 Mar '12, 22:58 TheOddOne2 |
osm2pgsql stores the data in several tables according to the style you used when you imported. The geometries is stored in postgis format. For a description on how to work with the geometries read the postgis manual. If you are unfemilear with sql there are a lot of resources out there on the internet. answered 11 Mar '12, 17:42 Gnonthgol ♦ |
You can find lots of example queries in mapnik stylesheets: https://trac.openstreetmap.org/browser/applications/rendering/mapnik/osm.xml answered 15 Mar '12, 09:25 emj |
There are many different ways to load osm data into a postgres database all depending on how you want to get the data out again. Can you tell us how you imported the data and possibly what you want with the database in the end.
Hello Gnonthgol,
I loaded osm data using osm2psql, in the end i would like those data as lists (csv or else) so i can import them somewhere else.