On Wed, Sep 21, 2011 at 2:12 AM, Roland Olbricht <roland.olbri...@gmx.de> wrote: > Hello everybody,
Hi. Please don't cross post. > If I deliver from Overpass API to JOSM the XML data with meta data and with a > plain <osm> tag, JOSM crashes with a NullPointerException on the first version > attribute. > > If I deliver, as suggested from a JOSM developer, with a > <osm version="0.6" generator="Overpass API"> root tag, JOSM and Osmosis both > complain about the absence of version attributes on the individual OSM > elements for data without meta data. On the OSM objects you mean? As in the node, way and relations? > Having OSM data with or without meta data is really a useful feature. If you're speaking about individual OSM objects, that's not metadata; that's data. OSM objects are identified by three identifiers: Object Type, ID and Version Those three identifiers are necessary when talking about an OSM object. Absence of one of them means the data isn't valid. The type and ID are obvious, but the version number appears to be tripping you up. The version number is not metadata, it's part of the identifier of the object. Two objects may have the same type and ID, but only one can exist in the DB at a time, the one with the highest version. The version # is required on all transactions in the API. As for the osm tag, that's also not metadata. The version number determines what is valid osm data as per the .6 representation. Some things were allowed in .5 that weren't in .6, and when .7 comes out, I'm sure it will differ from .6. The parsers need to know what format the data is in. In this case, one might say the identifier for the xml type is: Name + Version > The same > data with meta data is three times bigger than without, in a context, where > data size matters, and the meta data is usually only needed when one wants to > re-upload the data to the main database. Firstly, if you're concerned about data size, don't store or transmit raw XML. Transmit XML with gzip. That alone should compress a lot. Second, use newer formats like pbf. They make the OSM data even smaller. > So what attributes would you, as a toolmaker, expect on the root tag for OSM > data with or without meta data? http://wiki.openstreetmap.org/wiki/OSM_XML The format is clear and none of the attributes are optional. - Serge _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev