Opened 12 years ago

Closed 6 years ago

#337 closed enhancement (wontfix)

Node filter (simplified search) API

Reported by: owhite@… Owned by: steve@…
Priority: minor Milestone:
Component: api Version:
Keywords: search Cc: Hakan Tandogan

Description

See also proposal #281 for another search API

==Background==

Applications such as the osm@home Places website need to download a full list of objects matching some query (e.g. all cities) but do not wish to download the entire OSM dataset (via API or planet) to do so due to bandwidth or CPU concerns

  • The osm@home site would like to retrieve all nodes containing a place= tag
  • A wikipedia robot might like to get all nodes containing a wikipedia= tag
  • A sticky-note application like NickW's one might want all nodes with a notes= tag

==Proposal==

API that accepts a filter and optional bounding box, and returns nodes in OSM format

Filter

  • By existance of tags (must_exist=place)

==Use in search==

There are many ideas on how best to do search, see wiki page for examples. By adding a node-filter API, it becomes possible for many different people to write their own version of an OSM search, each of which can use latest data

  • "pubs near birmingham" could be split into two queries by the application: search for nodes with a place attribute to find the city, then another search for nodes with an amenity attribute using a bounding box around that city to find the pubs
  • "pubs near london, england" would simply take the results of the first search and look in returned is_in tags for which country the city is in
  • "poi:British Museum" could do a search for nodes with a wikipedia tag, then look for ones linking to British Museum
  • "bedford station" could search for nodes with a railway tag

It would be good to cover the most common case by adding a text-based search into the node filter, so that if someone knows the name of a node then it can be filtered before leaving OSM, hence lower bandwidth

Filter:

  • By case-insensitive name, e.g. "name=newcas"

(where caseinsensitive might need to be told about the UTF-8 locale)

Change History (3)

comment:1 Changed 12 years ago by Hakan Tandogan

Cc: Hakan Tandogan added

comment:2 Changed 11 years ago by xin@…

For the record, I am looking at implementing this now. I should have something by tomorrow.

The functionality will be similar to that provided by Osmxapi.

comment:3 Changed 6 years ago by Andy Allan

Resolution: wontfix
Status: newclosed

This functionality is covered by diff-consuming specialised services like XAPI, overpass and search by nominatim. The functionality won't be added to the core API.

Note: See TracTickets for help on using tickets.