[OSM-dev] Potlatch update

Richard Fairhurst richard at systemeD.net
Tue May 8 13:21:23 BST 2007


Nick Whitelegg wrote:

>> But it wouldn't be difficult to modify amf_controller.rb so that you
>> could also authenticate with user/pass. Let me know if you want this
>> doing and I'm happy to make the change.
>
> Yes, that would be useful thanks.

Ok, will work on that in the next day or two.

> Presumably the "amf" API call takes a way as a set of lat/lon, and  
> if I wanted to add nodes, I could just implement a "Flash  
> server" (if you see what I mean) on the freemap server and then go  
> through the normal "node" API?

All the gory details about the AMF messages are here:
http://wiki.openstreetmap.org/index.php/Potlatch/Remote_calls

It's not quite a simple ordered list of lats/lons, because it has to  
not break the existing OSM data structure. So node ids, segment ids,  
segment continuity etc. are also in there.

Really, the only thing that's stopped me doing nodes so far is that I  
haven't been able to think of an obvious query to find which POI  
nodes are in a given bounding box. Potlatch-server interaction works  
like this:

1. Potlatch says 'whichways' (which ways are within a bounding box?)
2. The server says '234523,234524,216789' etc.
3. Potlatch says 'getway' for each of those ways which it doesn't  
already have
4. The server sends them back

The obvious place to put the 'which POI nodes are in the bounding  
box' query is in the 'whichways' call. But I haven't yet figured a  
way to do that without getting every single node, the vast majority  
of which will be parts of ways rather than POIs - it seems terribly  
wasteful to get so many and then discard 98% of them. I guess the  
best option would be a query to 'select all those nodes within this  
area which aren't in a segment' - anyone who can come up with a quick  
way of doing this in SQL is welcome to tell me. :)

cheers
Richard




More information about the dev mailing list