Keyval... feature request

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Keyval... feature request

Nick Whitelegg-2





Hello Steve,

Sorry to follow-up my own message but I can now add extra info and have a
feature request...

>Looks good...

>Notice that the newnode.rb and newsegment.rb don't seem to do anything
with
>the 'tags' attribute. Does this work at the moment?

>Thanks,
>Nick

Managed to write a cURL program to "put" osm-format nodes to the server. It
worked, but I tried specifying the keyval (tags='name:Bloggs Street') and
it wasn't taken up (requesting the node later resulted in a blank tags
attribute).

Also I have a feature request.... I had a go at "put"ting multiple nodes.
It worked, but the response from the newnode script (i.e. the IDs assigned
to the node) was all on one line.

I would like to call the API from osm-editor to add nodes and segments to
OSM. The way I am intending to do this is as follows:

PUT all the nodes in a track to OSM
Receive back the assigned IDs
Use the assigned IDs to construct segments within osm-editor
PUT the resulting segments to OSM

However this will be much easier (from a parsing the IDs point of view) if
each ID sent back from newnode (if you PUT multiple nodes) is on a separate
line.

Anyway... thanks a lot for doing the OSM format and the keyval, can really
work on making osm-editor and freemap hook up to osm now :-)

Nick

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap



_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Keyval... feature request

Steve Coast
* @ 09/11/05 09:51:58 AM [hidden email] wrote:
> Managed to write a cURL program to "put" osm-format nodes to the server. It
> worked, but I tried specifying the keyval (tags='name:Bloggs Street') and
> it wasn't taken up (requesting the node later resulted in a blank tags
> attribute).

Fixed newnode and newsegment to take tags.

Can you use 'name=' instead of 'name:' ? :-)

> Also I have a feature request.... I had a go at "put"ting multiple nodes.
> It worked, but the response from the newnode script (i.e. the IDs assigned
> to the node) was all on one line.
>
> I would like to call the API from osm-editor to add nodes and segments to
> OSM. The way I am intending to do this is as follows:
>
> PUT all the nodes in a track to OSM
> Receive back the assigned IDs
> Use the assigned IDs to construct segments within osm-editor
> PUT the resulting segments to OSM
>
> However this will be much easier (from a parsing the IDs point of view) if
> each ID sent back from newnode (if you PUT multiple nodes) is on a separate
> line.

So... you're saying if you throw multiple nodes at newnode it returns a
list of multiple new id's and you want them on different lines?

Can you give me an example upload and response? newnode was never
intended to take more than one new node but I guess it works.

have fun,

SteveC [hidden email] http://www.asklater.com/steve/

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: Keyval... feature request

Nick Whitelegg-2
In reply to this post by Nick Whitelegg-2





SteveC <[hidden email]>@vr.ucl.ac.uk on 09/11/2005 16:20:41

Please respond to SteveC <[hidden email]>

Se


>Fixed newnode and newsegment to take tags.

>Can you use 'name=' instead of 'name:' ? :-)

Probably did, then forgot that was the syntax when writing this email...
:-)


>So... you're saying if you throw multiple nodes at newnode it returns a
>list of multiple new id's and you want them on different lines?

Yes, that's my observed behaviour.

>Can you give me an example upload and response? newnode was never
>intended to take more than one new node but I guess it works.

<osm version='0.2'>
<node lat='51' lon='-1' tags=''/>
<node lat='51.01' lon='-1.01' tags=''/>

Response: something like:

299927299928

i.e. IDs 299927 and 299928, written on one line.

It would be very useful to be able to do this. If I want to form nodes and
segments from a track in osm-editor, I will need to get OSM to allocate IDs
to the nodes first (hence, it would be best to throw all the nodes to
newnode at once) and then use the allocated IDs to form the segments, then
throw the segments at newsegment.

Nick



_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: Keyval... feature request

Steve Coast
* @ 09/11/05 05:43:29 PM [hidden email] wrote:

> Response: something like:
>
> 299927299928
>
> i.e. IDs 299927 and 299928, written on one line.
>
> It would be very useful to be able to do this. If I want to form nodes and
> segments from a track in osm-editor, I will need to get OSM to allocate IDs
> to the nodes first (hence, it would be best to throw all the nodes to
> newnode at once) and then use the allocated IDs to form the segments, then
> throw the segments at newsegment.

ok, fixed, it should print 1 per line now

have fun,

SteveC [hidden email] http://www.asklater.com/steve/

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap