openstreetmap / trac-tickets

Archived Trac Tickets
1 stars 1 forks source link

osm2pgsql 900913.sql failed to parse #2438

Closed openstreetmap-trac closed 3 years ago

openstreetmap-trac commented 3 years ago

Reporter: mdiener [Submitted to the original trac issue database at 5.34pm, Wednesday, 11th November 2009]

mdiener@nb01:~/Dev/osm2pgsql$ ./osm2pgsql -d gis -U mdiener -W * -H localhost -P 5432 -l -c /home/mdiener/Geo_data/austria.osm11112009.bz2 osm2pgsql SVN version 0.69-18551

Password:[[BR]] Using projection SRS 4326 (Latlong)[[BR]] Setting up table: planet_osm_point[[BR]] NOTICE: table "planet_osm_point" does not exist, skipping[[BR]] NOTICE: table "planet_osm_point_tmp" does not exist, skipping[[BR]] Setting up table: planet_osm_line[[BR]] NOTICE: table "planet_osm_line" does not exist, skipping[[BR]] NOTICE: table "planet_osm_line_tmp" does not exist, skipping[[BR]] Setting up table: planet_osm_polygon[[BR]] NOTICE: table "planet_osm_polygon" does not exist, skipping[[BR]] NOTICE: table "planet_osm_polygon_tmp" does not exist, skipping[[BR]] Setting up table: planet_osm_roads[[BR]] NOTICE: table "planet_osm_roads" does not exist, skipping[[BR]] NOTICE: table "planet_osm_roads_tmp" does not exist, skipping[[BR]] Mid: Ram, scale=10000000[[BR]]

Reading in file: 900913.sql[[BR]] Entity: line 1: parser error : Document is empty[[BR]] INSERT INTO spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text)VALUE[[BR]] 900913.sql : failed to parse[[BR]] Error occurred, cleaning up[[BR]]

openstreetmap-trac commented 3 years ago

Author: jburgess777[at]googlemail.com [Added to the original trac issue at 10.50pm, Wednesday, 11th November 2009]

Did you really use that '*'? If so, that is your problem, the shell is expanding that to all files in the directory.

I suspect you just want:

./osm2pgsql -d gis -U mdiener -W -H localhost -P 5432 -l -c /home/mdiener/Geo_data/austria.osm11112009.bz2

On most unix systems you can drop the -H & -P options since it will default to contacting the server on localhost anyway. If mdiener is your username and we remove all the other parameters which are the defaults then this line should be all you need:

./osm2pgsql -l /home/mdiener/Geo_data/austria.osm11112009.bz2

Are you sure you want to import the data as latlong? If you are intending to use this with the default mapnik style sheet then you'll want to use the default (900913) projection.

openstreetmap-trac commented 3 years ago

Author: amm [Added to the original trac issue at 4.51pm, Saturday, 12th January 2013]

Closing as it is out of date, and possibly was never a bug in the first place