0

I used this command to import the osm file to PostGIS:

osm2pgsql /Desktop/osm/mtl.osm -d demo_data -U blanco -P 5432 -S "/usr/local/share/osm2pgsql/default.style" --hstore

I am using osm2pgsql SVN version 0.84.0 (64bit id space)

Why am I unable to download planet_osm_nodes?

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
Setting up table: planet_osm_line
NOTICE:  table "planet_osm_line_tmp" does not exist, skipping
Setting up table: planet_osm_polygon
NOTICE:  table "planet_osm_polygon_tmp" does not exist, skipping
Setting up table: planet_osm_roads
NOTICE:  table "planet_osm_roads_tmp" does not exist, skipping
Using built-in tag processing pipeline
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=800MB, maxblocks=102400*8192, allocation method=3
Mid: Ram, scale=100

Reading in file: /Users/hadoop/Desktop/osm/mtl.osm
StartElement: Unknown element name: note
Unknown node type 3
EndElement: Unknown element name: note
StartElement: Unknown element name: meta
EndElement: Unknown element name: meta.   
Processing: Node(1234k 112.2k/s) Way(248k 15.56k/s) Relation(6805 3402.50/s)        parse time: 29s

Node stats: total(1234539), max(4764987639) in 11s
Way stats: total(248884), max(483754469) in 16s
Relation stats: total(6805), max(7120865) in 2s
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads

Writing way (248k)
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads

Writing relation (6798)
Sorting data and creating indexes for planet_osm_point
Sorting data and creating indexes for planet_osm_line
Sorting data and creating indexes for planet_osm_polygon
Sorting data and creating indexes for planet_osm_roads
node cache: stored: 1234539(100.00%), storage efficiency: 52.39% (dense    blocks: 276, sparse nodes: 1036935), hit rate: 98.58%
Analyzing planet_osm_roads finished
Copying planet_osm_roads to cluster by geometry finished
Creating geometry index on  planet_osm_roads
Creating indexes on  planet_osm_roads finished
All indexes on  planet_osm_roads created  in 1s
Completed planet_osm_roads
Analyzing planet_osm_polygon finished
Analyzing planet_osm_line finished
Analyzing planet_osm_point finished
Copying planet_osm_polygon to cluster by geometry finished
Creating geometry index on  planet_osm_polygon
Copying planet_osm_line to cluster by geometry finished
Creating geometry index on  planet_osm_line
Copying planet_osm_point to cluster by geometry finished
Creating geometry index on  planet_osm_point
Creating indexes on  planet_osm_polygon finished
All indexes on  planet_osm_polygon created  in 5s
Completed planet_osm_polygon
Creating indexes on  planet_osm_line finished
All indexes on  planet_osm_line created  in 7s
Completed planet_osm_line
Creating indexes on  planet_osm_point finished
All indexes on  planet_osm_point created  in 8s
Completed planet_osm_point

Osm2pgsql took 54s overall
  • Are you worried about the note and meta parts? – BradHards Mar 30 '17 at 23:26
  • I'm new in OSM, I'm using Python 'osmapi' and I would like to extract amenity from nodes, thats why I'm looking for planet_osm_nodes table to use osmapi.OsmApi().NodeGet(123). I'm not worried about note and meta parts. I only need to use the planet_osm_nodes table. Thank you – Adil Blanco Mar 31 '17 at 0:45
2

osmapi is intended to work against the http://wiki.openstreetmap.org/wiki/API_v0.6 which probably isn't what you want - that is the editing API.

Maybe you would be better off looking at the Overpass API which you can use off a public instance, or install your own if your needs exceed the public usage limits.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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