Naughter Software Logo

CNominatim v1.03 A set of MFC 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, CArray<CSearchPlace, CSearchPlace& >& result, const CString& ssServer = _T("nominatim.openstreetmap.org"), const CString& sURL = _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, const CString& ssServer = _T("nominatim.openstreetmap.org"), const CString& sURL = _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, CArray<CLookupPlace, CLookupPlace& >& result, const CString& ssServer = _T("nominatim.openstreetmap.org"), const CString& sURL = _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 2008 console application which demonstrates the classes using the sample as mentioned on the Nominatim wiki page.

 

Copyright

 

Updates

V1.0 (24 October 2010)

V1.01 (7 August 2011)

V1.02 (21 July 2013)

V1.03 (8 November 2015)