You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2009-08-06 13:23:50

richard_m4
Member
Registered: 2009-08-05
Posts: 3

Extra content at the end of the document: </node>

Hi,


I'm running osm2pgsql on a centos 4.7 machine using the peak-north extract from http://nick.dev.openstreetmap.org/downloads/planet.


When ever i run: ./osm2pgsql -m -d gis ../peak-north-090729.osm

i get the following output:



osm2pgsql SVN version 0.66-

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Mid: Ram, scale=100

Reading in file: ../peak-north-090729.osm
Processing: Node(100k) Way(0k) Relation(0k)Entity: line 214263: parser error : Extra content at the end of the document
  </node>
         ^
../peak-north-090729.osm : failed to parse
Error occurred, cleaning up


could anyone help? Thanks.

Offline

#2 2009-08-06 15:12:24

richard_m4
Member
Registered: 2009-08-05
Posts: 3

Re: Extra content at the end of the document: </node>

It would seem the xml was ill-formed. I added </osm> at the end of the file by echo "</osm>" >> peak-north-090729.osm and it returned :

cd /tmp/osm2pgsql/; ./osm2pgsql -m -d gis ../peak-north-090729.osm
osm2pgsql SVN version 0.66-

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Mid: Ram, scale=100

Reading in file: ../peak-north-090729.osm
Processing: Node(107k) Way(0k) Relation(0k)
Node stats: total(107991), max(447991674)
Way stats: total(0), max(0)
Relation stats: total(0), max(0)

Writing way(0k)

Writing rel(0k)
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads
Committing transaction for planet_osm_point
Sorting data and creating indexes for planet_osm_line
Sorting data and creating indexes for planet_osm_roads
Sorting data and creating indexes for planet_osm_polygon
Sorting data and creating indexes for planet_osm_point
Completed planet_osm_roads
Completed planet_osm_line
Completed planet_osm_polygon
Completed planet_osm_point




I assume this is correct?! Could someone shed any light as to why the xml was wrong?

Last edited by richard_m4 (2009-08-06 15:15:59)

Offline

#3 2009-08-06 19:21:30

Ldp
Member
From: NL - Zeeland
Registered: 2008-07-22
Posts: 820

Re: Extra content at the end of the document: </node>

I assume the extract was corrupt, or your download was incomplete. Hard to check, because the url you gave 404's on me.

Offline

#4 2009-08-06 19:25:00

Ldp
Member
From: NL - Zeeland
Registered: 2008-07-22
Posts: 820

Re: Extra content at the end of the document: </node>

Okay, the extra . caused the 404.

Having checked peak-north-090729.osm, I can definately say that the file is incomplete. Even with your </osm> you still don't have a meaningful import, since there are only nodes in the file, no ways and relations.

All the 090729 extracts there are shorter than previously, so I assume all of them are broken.

edit: I emailed the maintainer. Hope he can get around to it, so you have fresh extracts to work with. In the mean time, you'd better use one of the older ones.

Last edited by Ldp (2009-08-06 19:32:53)

Offline

#5 2009-08-07 09:23:47

richard_m4
Member
Registered: 2009-08-05
Posts: 3

Re: Extra content at the end of the document: </node>

Ahh. Thank you! I wondered why it was playing up.

Last edited by richard_m4 (2009-08-07 09:53:02)

Offline

#6 2009-08-16 13:15:27

nickw
Member
Registered: 2008-04-17
Posts: 5

Re: Extra content at the end of the document: </node>

Hi, sorry for the late reply, have sorted this out now. The problem was that the maximum node ID in the planet-excerpt script had been exceeded, this happens from time to time. Anyway I've raised it now and set the latest extract to rerun tonight. So there should be extracts from 090812 tomorrow. btw are there any alternatives to planetosm-excerpt.pl floating around which don't have the maximum node ID limit problem?

Nick

Offline

#7 2009-08-16 16:37:34

Ldp
Member
From: NL - Zeeland
Registered: 2008-07-22
Posts: 820

Re: Extra content at the end of the document: </node>

I don't know. I've always used osmosis to make my planet extracts.

Offline

Board footer

Powered by FluxBB