[OSM-talk] Issues with OSM import to postgis

Zolt Egete xphreakster at gmail.com
Mon Jun 13 11:35:48 BST 2011


Hello

As I have promised I have tried to import  the old file without the -u 
option so not to use utf sanitize and I still got a problem
  ./osm2pgsql -U postgres -v -s -S default.style -d gisa -C 2500 
/home/zsolt/tmp/planet-100127.osm
osm2pgsql SVN version 0.70.5

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
Setting up table: planet_osm_line
NOTICE:  table "planet_osm_line" does not exist, skipping
NOTICE:  table "planet_osm_line_tmp" does not exist, skipping
Setting up table: planet_osm_polygon
NOTICE:  table "planet_osm_polygon" does not exist, skipping
NOTICE:  table "planet_osm_polygon_tmp" does not exist, skipping
Setting up table: planet_osm_roads
NOTICE:  table "planet_osm_roads" does not exist, skipping
NOTICE:  table "planet_osm_roads_tmp" does not exist, skipping
Mid: pgsql, scale=100, cache=2500MB, maxblocks=320001*8192
Setting up table: planet_osm_nodes
NOTICE:  table "planet_osm_nodes" does not exist, skipping
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"planet_osm_nodes_pkey" for table "planet_osm_nodes"
Setting up table: planet_osm_ways
NOTICE:  table "planet_osm_ways" does not exist, skipping
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"planet_osm_ways_pkey" for table "planet_osm_ways"
Setting up table: planet_osm_rels
NOTICE:  table "planet_osm_rels" does not exist, skipping
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"planet_osm_rels_pkey" for table "planet_osm_rels"

Reading in file: /home/zsolt/tmp/planet-100127.osm
Processing: Node(3670k) Way(0k) Relation(0)Entity: line 21837637: parser 
error : Unescaped '<' not allowed in attributes values
750" lon="10.4204140" timestamp="2006-12-31T06:28:45Z" version="1" 
changeset="17
                                                                                ^
Entity: line 21837637: parser error : attributes construct error
750" lon="10.4204140" timestamp="2006-12-31T06:28:45Z" version="1" 
changeset="17
                                                                                ^
Entity: line 21837637: parser error : Couldn't find end of Start Tag node
750" lon="10.4204140" timestamp="2006-12-31T06:28:45Z" version="1" 
changeset="17
                                                                                ^
/home/zsolt/tmp/planet-100127.osm : failed to parse
Error occurred, cleaning up

The newest file I have downloaded I could not unpack since there is an 
archive error
I really need help cause I am on a project and I need to set the server 
up, I am already over my time which was planned for this task.

 From where can I download a good planet file ? I have tried from the 
links which are provided from the openstreetmap site but since now only 
one file have worked for me, only one I could unpack

On 6/13/2011 12:07 PM, M∡rtin Koppenhoefer wrote:
> 2011/6/13 Zolt Egete<xphreakster at gmail.com>:
>> Hello
>>
>> Thank you for the quick reply
>> I will give it a try without the -u option not to use the UTF-8 sanitize and
>> will let you know the results as soon as I have some
>>
>> As far as other map files are concerned I have downloaded a few ones but
>> this is the only one which I could unpack (have used pbzunzip2, bzip2,
>> bunzip2) but all the time I have got corrupt archive messages.
>> Also the MD5 sum of the downloaded file where not consistent with the md5
>> hash sum from the servers (I do not yet know the reason why)
>>
>> I have downloaded the other day the latest planet file which is almost 17GB
>> large and have started to unpack this morning with the following command
>>   pbunzip2 -d -k planet-latest.osm.bz2
>> pbzip2: *ERROR during decompression: -4
>>
>> and the error have shown after 200GB is unpacked, but I can still see the
>> process going on, despite for the error and now it is on 227 GB
>> Do you think this can impose a problem with the unpacked OSM file ?
>
> yes, the md5 check should pass OK, otherwise I suspect there is a
> problem with your download. I suggest you try first a smaller extract
> to test your setup, e.g. one of geofabrik. You also don't have to
> unpack the file, you can pipe it with bzcat to osm2pgsql. See the wiki
> for details. Another option is using pbf files (binary), see the wiki.
>
> cheers,
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20110613/48a7790d/attachment.html>


More information about the talk mailing list