[OSM-dev] Representing differences between sets of OSM data
Martijn van Oosterhout
kleptog at gmail.com
Mon Aug 20 07:51:32 BST 2007
On 8/20/07, Brett Henderson <brett at bretth.com> wrote:
> Do you have a simple example of planetdiff data (ie. a small extract of
> data)?
I just looked at one of the files on planet.openstreetmap.org, for example:
http://planet.openstreetmap.org/planet-070808-070815.diff.xml.bz2
> > I'll have to look a little more at the osmosis diffs. It would be good
> > to converge on a common format.
The formats are already very very close. Below I've listed an example
of the same change in all three formats. As you can see they are 99%
identical. The only difficult part is that planetdiff has the old
version, which neither of the other two formats have.
For JOSM:
<osm version="0.3" generator="JOSM">
<node id="12050350" timestamp="2007-01-02T00:00:00.0+11:00"
lat="-33.9133118622908" lon="151.117335519304" action="modify">
<tag k="created_by" v="JOSM"/>
</node>
</osm>
For planetdiff:
<planetdiff version="0.1" generator="planetdiff">
<delete>
<node id="12050350" timestamp="2007-01-02T00:00:00.0+11:00"
lat="-33.9133118622908" lon="151.117335519304">
<tag k="created_by" v="JOSM"/>
<tag k="old" v="tag"/>
</node>
</delete>
<add>
<node id="12050350" timestamp="2007-01-02T12:00:00.0+11:00"
lat="-33.9133118622908" lon="151.117335519304">
<tag k="created_by" v="JOSM"/>
</node>
</add>
</planetdiff>
And for osmChange:
<osmChange version="0.3" generator="Osmosis">
<modify version="0.3" generator="Osmosis">
<node id="12050350" timestamp="2007-01-02T00:00:00.0+11:00"
lat="-33.9133118622908" lon="151.117335519304">
<tag k="created_by" v="JOSM"/>
</node>
</modify>
</osmChange>
Have a nice day,
--
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the dev
mailing list