[OSM-dev] osm2pgsql failing with low cache size
Paul Norman
penorman at mac.com
Wed Jun 20 15:30:48 BST 2012
> From: Roland Olbricht [mailto:roland.olbricht at gmx.de]
> Subject: Re: [OSM-dev] osm2pgsql failing with low cache size
>
> Hi,
>
> > > Reading in file: ./data/latest.xml
> > > StartElement: Unknown element name: note Unknown node type 3
> > > EndElement: Unknown element name: note
> > > StartElement: Unknown element name: meta
> > > EndElement: Unknown element name: meta Segmentation fault (core
> > > dumped)
> >
> > Can you sanitize your XML by running it through Osmosis (--read-xml
> > latest.xml --write-xml foo.xml) and then try osm2psql again on the
> > resulting file? Just to be safe that there's nothing strange in there
> > that breaks it.
>
> The <note> element contains a license remark, the <meta> element a
> timestamp. Both are in the beginning of the file. You could simply
> remove them with a text editor.
>
> It is a little bit surprising to me because the osm2pgsql version I
> tried had happily ignored the extra elements.
>
> The rationale behind these two elements (and a third element <error>
> appearing only in case of an error) is to provide useful information in
> additional tags. This allows any tool to safely just ignore tags which
> it doesn't know. The license remark is a matter of good style - nobody
> should say he didn't know about the license of the excerpt. And the
> timestamp can enable editors like JOSM with the mirrored_download plugin
> to decide whether a given set of data is outdated or not.
The issue I have with the timestamp given by overpass is it ignores the XAPI
output format, even in XAPI compatibility mode. Since at least 2010 the XAPI
output has included xapi:planetDate and xapi:copyright attributes to the
<osm> element, not as stand-alone tags.
More information about the dev
mailing list