[OSM-dev] Edit question with respect to JOSM changeset representation
Frederik Ramm
frederik at remote.org
Thu Mar 18 22:58:12 GMT 2010
Hi,
note that your example is slightly unusual in that you have
concatenated two ways to form a scenic route but they do not share a
common node. This is possible but a more realistic example would be
<way id=1>
<nd ref=1>
<nd ref=2>
</way>
<way id=2>
<nd ref=2>
<nd ref=3>
</way>
> Then the user goes ahead and deletes the sidewalk feature meaning
> deleting way1. What happens to the relation1 and how is the modification
> expressed in the changeset of the JOSM file format?
JOSM actually lets you do different things, but it never lets you break
referential integrity. You can delete the way and automatically remove
it from the relation (leading to a way delete and relation modify), or
you can delete the relation together with the way (leading to two deletes).
Deleting only the way is not possible.
When uploading changes to the API, JOSM must make sure to send the
relation modification or deletion before the way deletion, because
otherwise the way deletion will be rejected by the API as breaking
referential integrity.
> <node id=1 action=delete>
>
> <node id=2 action=delete> (which would make way1 being deleted but what
> about relation1?)
JOSM can delete nodes 1 and 2 for you if you delete the way (unless they
are still used by something else). In that case the node deletion will
be added to the list of changes (and sent to the API *after* the way
deletion has been sent).
But if you are writing an editor then it might not be the grandest idea
to use JOSM's file format (unless you want JOSM users to be able to
process the files generated); I would instead store data directly in
osmChange (.osc) style.
If you really want to interact with JOSM then you could join the
josm-dev list.
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the dev
mailing list