4

This is my first time working with OpenStreetMap data.

I am trying to import some data from OpenStreetMap into PostgreSQL. I have been downloading the data using the following query :

wget 'http://overpass-api.de/api/interpreter?data=node(52.06,5.04,52.08,5.06);out;' -O utrecht2.osm

Then, I have imported the resulting file into PostgreSQL using osm2pqsql:

osm2pgsql -c -d utrecht -C 1000 --flat-nodes /home/me/Documents/01_perso/28_routing --hstore -S default.style utrecht2.osm

Everything seem to run without any error (that I can see at least).

I am using the default.style file that can be found here for the import.

Finally, I am looking at the data that has been imported into my Postgresql table. What annoys me is that only the planet_osm_point table contains information. All other tables are empty.

When looking at the area using the OSM website, it is clear to me that there should be way more information available, in terms of polygons, roads, etc

I have tried to reduce my search area several times, wondering if I hadn't reached the overpass API limits but without success so far.

Could someone point me towards the reason why I don't get any road, polygon, line information into my database?

2

1 Answer 1

5

As you query to have only nodes it is that all you get. See http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Nodes for more details.

Your query should be

http://overpass-api.de/api/interpreter?data=(node(52.06,5.04,52.08,5.06);<;>;);out;

1
  • Ha yes, you are totally right. I think I was mislead by the examples of the API. Thanks:)
    – jlengrand
    Commented Mar 1, 2015 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.