Potlatch 1/Remote calls

From OpenStreetMap Wiki
Jump to: navigation, search

Contents

Summary

This page documents Potlatch's inner workings before API 0.5 went live. Most of the information is still essentially current, but some extra methods and parameters have been added - see amf_controller.rb for more. The page will be updated in due course.

The following methods are supported by amf_controller.rb:

Common features

Queries that write to the database (i.e. putway/deleteway) require authentication via a valid OSM website user token.

All queries take care not to delete any segments and nodes that are used in other ways.


getway

Get a way as an ordered list of nodes.

Called with

Returns

Array comprising:

Notes

For the reason why objectname is passed through, see here. However, as objectname is always equivalent to the way ID, it could probably be removed in this case.


putway

Save a way in the database.

Called with

Returns

Notes

See /putway SQL.

deleteway

Delete a way from the database, including all constituent segments/nodes.

Called with

Returns


whichways

Return list of all ways in a bounding box.

Called with

Bounding box in this order:

Returns

List of way IDs.

Notes

At present, whichways does not use the correct SQL to find ways whose start and end points are both outside the box, but which nonetheless cross through. Instead, it requests a slightly larger bounding box.


getpresets

Read key/value preset menus from file.

Called with

Nothing.

Returns

Array comprising:

Personal tools
Namespaces
Variants
Actions
site
Toolbox