[OSM-dev] API id placeholders

SteveC steve at asklater.com
Sun May 6 10:29:12 BST 2007


On 6 May 2007, at 08:15, Lars Aronsson wrote:
> 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.

It's not id='create', it's the URL for node creation is /api/0.4/node/ 
create rather than /api/0.4/node/0. It's a nicer URL.

> 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?

Sort of, but then the map?bbox= call does too.

> 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.

Is it beyond you to fix it also?

have fun,

SteveC | steve at asklater.com | http://www.asklater.com/steve/






More information about the dev mailing list