Naughter Software Logo

CNominatim v1.10 A set of C++ classes to handle Nominatim queries

Nominatim is the search tool used by OpenStreetMap. For further information on Nominatim, please see http://wiki.openstreetmap.org/wiki/Nominatim. Nominatim is a web service provided by OpenStreetMap to convert addresses to locations on a map and the reverse also known as Geocoding which converts a lat / long point or specific OSM element to an address. It also allows lookup of specific OSM ids.

 

The classes provided are: Nominatim::CSearchQuery, Nominatim::CSearchPlace, Nominatim::CReverseGeocodingQuery, Nominatim::CReverseGeocodingQueryResult, Nominatim::CAddressLookupQuery, Nominatim::CLookupPlace & Nominatim::CNominatim. The three main methods provided are:

HRESULT Search(const CSearchQuery& query, CSearchPlaceArray& result, LPCTSTR pszServer = _T("nominatim.openstreetmap.org"), LPCTSTR pszURL = _T("search"))

The search method performs the address lookup query using the parameters specified in "query" and returns an array of results in "result" using the specified Nominatim server "sServer". The method returns a standard HRESULT code to indicate success or failure.

 

HRESULT ReverseGeocoding(const CNominatimReverseGeocodingQuery& query, CNominatimReverseGeocodingQueryResult& result, LPCTSTR pszServer = _T("nominatim.openstreetmap.org"), LPCTSTR pszURL = _T("reverse"))

The ReverseGeocoding method performs the reverse geocoding query using the parameters specified in "query" and returns the result in "result" using the specified Nominatim server "sServer". The method returns a standard HRESULT code to indicate success or failure.

 

HRESULT AddressLookup(const CAddressLookupQuery& query, CLookupPlaceArray& result, LPCTSTR pszServer = _T("nominatim.openstreetmap.org"), LPCTSTR pszURL = _T("lookup"))

The AddressLookup method performs the address lookup query using the parameters specified in "query" and returns the result in "result" using the specified Nominatim server "sServer". The method returns a standard HRESULT code to indicate success or failure.

 

 

Features

 

The enclosed zip file contains the CNominatim source code and a simple VC 2017 console application which demonstrates the classes using the sample as mentioned on the Nominatim wiki page.

 

Copyright

 

Updates

v1.10 (5 June 2022)

v1.09 (30 December 2021)

v1.08 (16 December 2021)

v1.07 (29 March 2020)

v1.06 (22 November 2018)

v1.05 (8 October 2017)

v1.04 (8 October 2017)

v1.03 (8 November 2015)

v1.02 (21 July 2013)

v1.01 (7 August 2011)

v1.0 (24 October 2010)