[OSM-dev] osm2pgsql failing with low cache size

Roland Olbricht roland.olbricht at gmx.de
Wed Jun 20 10:12:20 BST 2012


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.

Cheers,

Roland

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



More information about the dev mailing list