[OSM-dev] Representing differences between sets of OSM data

Jon Burgess jburgess777 at googlemail.com
Mon Aug 20 20:16:17 BST 2007


On Mon, 2007-08-20 at 13:37 +0200, Immanuel Scholz wrote:
> > In JOSM you get data which is unmodified too. Also the data in JOSM is
> > complete, i.e. if there is a way, then you also have the relevant
> > segments and nodes which it references.
> 
> Not necessarily. JOSM still supports incomplete ways and the fact the
> current server implementation does not return them via map-request may
> change in future (e.g. because of relationships or other server
> implementations)
> 

Ah I forgot that.

> 
> > In theory I could probably adapt the planetdiff format to be closer to
> > that used by JOSM but I'd need to be convinced it was really worth the
> > effort. I'd be against adding information about the unmodified nodes and
> > segments to the diff since this would increase the file size and also
> > break the streaming algorithm which the diff tool currently uses.
> 
> Just remove the unmodified stuff from the xml file. JOSM can parse any
> subset of an osm-file back, however, some objects will be incomplete or
> ignored at all (JOSM will not import incomplete segments for now).
> 

I was thinking of the inverse. If people developed tools based on the
JOSM format then they might assume the data was always 'complete'. Such
tools would not work with a planetdiff which was missing all unmodified
data (even if the raw format of the file is compatible).


> Bear in mind, that the JOSM approach was taken so that "changesets" and
> "normal" xml files are readable by the same parser.
> 
> Note also, that you can store any "historical" objects with the same id
> into a XML file and JOSM will happily ignore all but the last tag (which
> should be changed to "all but the one with the highest timestamps",
> perhaps). This way you can store "original" values in changesets without
> changing JOSM at all.
> 
> 
> There are some other unofficial additions to the osm-schema made by
> JOSM, e.g. the tag "bound".
> 

I must add that one to the osm2pgsql code at some point, it currently
emits a warning about that tag when you feed in a JOSM osm file. Ideally
I should probably also teach it not to import objects with
action='delete'.


	Jon






More information about the dev mailing list