A point of interest search service that uses OpenStreetMap data.
C# ASP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Santolibre.Map.Search.CacheUtility
Santolibre.Map.Search.Lib
Santolibre.Map.Search.LibTest
Santolibre.Map.Search.WebService
.gitignore
LICENSE.txt
README.md
map-search.sln

README.md

map-search

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 you could plug in any geocoding provider.

API

GET http://search.map.santolibre.net/api/v1/search/[term]?latitude=[latitude]&longitude=[longitude]&searchRadius=[radius]

Parameters

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 specified to define the search location.
latitude Latitude of the search location
longitude Longitude of the search location
searchRadius Search radius in kilometers

Response

{
  "name": [address name],
  "location": {
    "lat": [latitude],
    "lng": [longitude]
  },
  "radius": [search radius],
  "pointsOfInterest": [{
        "id": [osm node id],
        "location": {
          "lat": [latitude],
          "lng": [longitude]
        },
        "category": [category],
        "type": [type],
        "tags": {
          [tag key]: [tag value],
          [tag key]: [tag value]
        },
        "dateUpdated": [import date]
    }
  ]
}

Examples

Search for something at a specific address

GET http://search.map.santolibre.net/api/v1/search/table%20tennis%20near%20berlin?searchRadius=5

Search for something at a specific location

GET http://search.map.santolibre.net/api/v1/search/atm?latitude=51.511373&longitude=-0.119230&searchRadius=2

Cache utility

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

Santolibre.Map.Search.CacheUtility.exe --import=C:\temp\osm\europe-latest.osm.pbf

Removing old data

Santolibre.Map.Search.CacheUtility.exe --remove-older-than=7

Parameters

Parameter Description
--import=[filename] Import a .osm.pbf file
--remove-older-than=[days] Remove data older than number of [days]
--compact-database Compact the database