A point of interest search service that uses OpenStreetMap data. It uses RavenDB for storing and searching the imported OSM data. Address geocoding is done with the MapQuest OSM API, but any geocoding provider could be used instead.
The POI search is based on OpenStreetMap tags and values, so the search terms have to be in English. A search for "table tennis" and "atm" will work, but a search for "Tischtennis", "ping pong table" and "cash dispenser" won't.
Because the service separates address and point of interest search, a special term has to be used to separate the two. Currently those terms are "near", "in" and "around".
GET https://search.map.santolibre.net/api/v1/search/[term]?latitude=[latitude]&longitude=[longitude]
Parameter | Description |
---|---|
term | The term is in the form What near|in|around Where. If there is no Where part, latitude and longitude have to be specified to define the search location. |
latitude | Optional latitude of the search location |
longitude | Optional longitude of the search location |
{
"radius": [search radius],
"center": {
"lat": [latitude],
"lng": [longitude]
},
"locations": [{
"id": [osm node id],
"tags": {
[tag key]: [tag value],
[tag key]: [tag value]
},
"dateUpdated": [import date],
"name": [name]
"geoCoordinates": {
"lat": [latitude],
"lng": [longitude]
},
"category": [category],
"type": [type]
}
]
}
Search for something at a specific address
GET https://search.map.santolibre.net/api/v1/search/italian restaurant in luzern
GET https://search.map.santolibre.net/api/v1/search/table tennis near berlin
Search for something at a specific location
GET https://search.map.santolibre.net/api/v1/search/atm?latitude=51.511373&longitude=-0.119230
The cache utility requires osm data to be in the PBF format (http://wiki.openstreetmap.org/wiki/PBF_Format).
Downloading data
wget.exe --directory-prefix=C:\temp\osm http://download.geofabrik.de/europe/europe-latest.osm.pbf
Importing data
dotnet Santolibre.Map.Search.CacheUtility.dll --import=C:\temp\osm\europe-latest.osm.pbf
Removing old data
dotnet Santolibre.Map.Search.CacheUtility.dll --remove-older-than=7
Parameter | Description |
---|---|
--import=[filename] | Import a .osm.pbf file |
--remove-older-than=[days] | Remove data older than number of [days] |
--analyze-index-terms | Shows how many times index terms are referenced by points of interests |
--compact-database | Compact the database |
The search service is running on https://map.santolibre.net, but we warned that the server is not very fast.
The following screenshot shows chinese restaurants in Vienna