Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

osm2pgsql 900913.sql failed to parse #2438

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

osm2pgsql 900913.sql failed to parse #2438

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

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
Copy link
Author

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant