[OSM-dev] osm2pgsql: parse-xml2.c:100: StartElement: Assertion `xlon' failed.

marqqs at gmx.eu marqqs at gmx.eu
Fri Aug 12 15:49:08 BST 2011


Hi Peter,

thanks for answering!
This question is very old, and there have been a few discussions concerning this subject since then.


> >> My question: Does osm2pgsql really need the coordinates of an object
> >> which is to delete anyway?
> >
> > No.
> 
> Yes, in order to expire the tile the node was previously on.


The first guess was that this information is not needed. Because of this, Frederik kindly removed the related assert() calls in osm2pgsql's source.

These days it's rumored that the coordinates would be needed to create the dirty-tiles list. And Frederik reinserted the assert() calls, didn't he?

Why? Does anybody know the answer for sure?

Of course, at first glance I would have thought the same. BUT - the old coordinates are in the database too, why not take them from there?

If the algorithm would really rely on getting the old coordinates via .osc file, it would not be able to calculate the dirty tiles of a way which is going to be deleted (without deleting it's nodes). Same applies to relations which are to be deleted or to ways whose tags shall be changed.

Furthermore, dirty-tiles lists could not be created at all if simplified change files were processed. "Simplified" means that there are not necessarily all intermediate versions available in the file (e.g. if you're using daily change files).

Who started this roumor? Please step forward... ;-)

Markus


-------- Original-Nachricht --------
> Datum: Fri, 12 Aug 2011 13:35:07 +0200
> Von: "Peter Körner" <osm-lists at mazdermind.de>
> An: Frederik Ramm <frederik at remote.org>
> CC: marqqs at gmx.eu, dev at openstreetmap.org
> Betreff: Re: [OSM-dev] osm2pgsql: parse-xml2.c:100: StartElement: Assertion `xlon\' failed.

> Am 31.05.2011 00:25, schrieb Frederik Ramm:
> > Hi,
> >
> > marqqs at gmx.eu wrote:
> >> osm2pgsql persists on getting coordinates (lon/lat) even when it
> >> reads an .osc file and the OSM object in question is to delete.
> >
> > Which software generates .osc files that do *not* have lon/lat
> > attributes on nodes to be deleted?
> >
> >> My question: Does osm2pgsql really need the coordinates of an object
> >> which is to delete anyway?
> >
> > No.
> 
> Yes, in order to expire the tile the node was previously on.
> 
> Peter



More information about the dev mailing list