[OSM-dev] API id placeholders
Lars Aronsson
lars at aronsson.se
Sun May 6 08:15:38 BST 2007
I observed that one difference between the API 0.3 and 0.4 is that
instead of id=0 for object creation, one should now specify
id=create. It is beyond me to know which problem this solves.
If I create two nodes and a connecting line segment in JOSM and
save an .OSM file before uploading these changes to the server, it
saves the following:
<osm version='0.3' generator='JOSM'>
<node id='-1' lat='2.82' lon='29.25' />
<node id='-2' lat='1.67' lon='27.16' />
<segment id='-3' from='-1' to='-2' />
</osm>
Couldn't the OSM API be made to accept negative ID numbers as
placeholders in this fashion, and to allow multiple objects (e.g.
these two nodes and one line segment) in one request? Would that
terribly break some rule in the REST bible?
Sometimes when I need to change the direction of every line
segment in a long way, or want to change or remove an attribute
from a large number of objects, I get many changes to upload to
the server. As far as I understand, each little change must go in
a separate HTTP call, each taking at least the ping roundtrip
time. For a few thousand changes, this takes several minutes.
--
Lars Aronsson (lars at aronsson.se)
Aronsson Datateknik - http://aronsson.se
More information about the dev
mailing list