OSM Notes API
From OpenStreetMap Wiki
Some time ago there was a discussion about having a notes/feedback API: http://lists.openstreetmap.org/pipermail/talk/2008-January/022577.html
Contents |
Notes API
Required Fields:
- id (auto allocated by server)
- lat (latitude)
- lon (longitude)
- summary (short note)
- tile (used for bbox searches)
Optional extras:
- description (longer note)
- email (for requesting more info from submitter, also permits adoption by users with same email address)
- userid (for adopted notes or those uploaded as part of a gpx trace)
- date (user defined date)
- timestamp (server timestamp)
- status (new, under review, fully processed)
- trace (link to gpx trace)
- node (link to node that is related)
API
The API does not require authentication, if it gets spammed it may be brought in, but as the interface to it will be a 'report an error' type page, or a 'show errors' type button within map editors any spamming will have very few eyeballs so would be a relatively unfruitful target for a would be spammer.
| Purpose | HTTP Method and URL | Payload | |
|---|---|---|---|
| Request | Response | ||
| Creation | PUT /api/0.5/note/create | XML | id |
| Retrieval | GET /api/0.5/note/<id> | n/a | XML |
| Update | PUT /api/0.5/note/<id> | XML | empty |
| Deletion | DELETE /api/0.5/note/<id> | n/a | n/a |
| BBox | GET /api/0.5/notes/?bbox=<left>,<bottom>,<right>,<top> | n/a | XML |
Possible uses
- Fire and forget comments about a specific part of the map
- Part of a map creation workflow - you cycle round recording a gpx trail, recording notable points, ends of named roads, post boxes etc. You then upload the gpx trail as normal, and then upload your annotations linked into your gpx trail.
- Sketch on the map - the sketch is uploaded as a linked gpx trail along with the note explaining what its about
Experiments
A couple of examples have been created of possible user interfaces to this notes system.
Implementation
See trac ticket #742