This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Python Module OsmApi to DB

0

Hello again,

How can i use Python Module OsmApi to acess information an insert it on a Database (PostgreSQL). My idea was to access the tags of osm and make a conection betteween the id of the Osm to the id of the DB. For example (Node="123") to DB Id.

Thank you again for all the help,

Francisco Costa

asked 29 Oct '15, 12:08

FrancisCosta's gravatar image

FrancisCosta
0121213
accept rate: 0%

edited 25 Mar '17, 09:33

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

3

The API accessed by the Python Module OsmApi is not meant to be an API for reading information from OSM; it is an editing API. If you want to extract information from OSM, process a planet file or data extract, or use the Overpass API. -- There are ready-made tools like osm2pgsql or imposm that will take an OSM data file and load it into a PostGIS database.

answered 29 Oct '15, 13:04

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .