[OSM-talk] setting up PostGIS, importing data

Torsten Mohr tmohr at s.netic.de
Tue Mar 23 06:01:42 GMT 2010


Hello,

thanks for your hints, i've set up the database "gis" completely new,
now i also imported _int.sql.

> > Setting up table: planet_osm_nodes
> > *** WARNING: intarray contrib module not installed

Now i get this error during import:

Reading in file: /local/ftp/osm/planet-100310.osm.bz2
Processing: Node(349410k) Way(0k) Relation(0k)Entity: line 529642199: parser 
error : xmlParseCharRef: invalid xmlChar value 24
    <tag k="name" v="Meycauayan City Northbound Entry Point" />
                          ^
Entity: line 529642199: parser error : xmlParseCharRef: invalid xmlChar value 
22
    <tag k="name" v="Meycauayan City Northbound Entry Point" />
                               ^
/local/ftp/osm/planet-100310.osm.bz2 : failed to parse
Error occurred, cleaning up


I can't imagine that the file is corrupt.  I do not use mercator projection in 
the database, based on a hint i got here.  I use -l to get lat/lon.
But i also can't imagine that this is the problem.


Here are the commands that i used to set everything up:

su postgres
createuser -Upostgres -S -D -R tmohr
createdb -Upostgres  -EUTF8 gis
psql -Upostgres gis
gis=# GRANT ALL ON SCHEMA PUBLIC TO tmohr;
GRANT
\q
createlang plpgsql gis
psql -d gis -f /usr/share/postgresql/contrib/_int.sql

psql -d gis -f /usr/share/postgresql/contrib/postgis.sql

psql -d gis -f /usr/share/postgresql/contrib/spatial_ref_sys.sql

psql -d gis

GRANT ALL on geometry_columns TO tmohr;

GRANT ALL on spatial_ref_sys TO tmohr;

GRANT ALL ON SCHEMA PUBLIC TO tmohr;


osm2pgsql -s -l /local/ftp/osm/planet-100310.osm.bz2


Did anybody have this bug before?

Does anybody know what's wrong?


Thanks for any hints,
Torsten.




More information about the talk mailing list