Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I write to ask you if did you ever used the new API in GDAL for geocoding. (Link for description: http://www.gdal.org/ogr/ogr__geocoding_8h.html#a2b0382ceb7e3935d7fe1da2adada564e ). Do you know what is the method with gdal can associate a location with specific coordinates? I ask you because I don't understand what does it means : "It runs a geocoding request.If the result is not found in cache, a GET request will be sent to resolve the query". I found a simple code to require a location coordinates:

/* Create a session with default options */

OGRGeocodingSessionH hSession = OGRGeocodeCreateSession(NULL);

/* Now query the service */

OGRLayerH hLayer = OGRGeocode(hSession, "Paris", NULL, NULL);

/* Use the result layer (the first feature is generally the most relevant) */

/* Cleanup */



Do you confirm this is the code to require a location coordinates? And if I want to find coordinates of a street adress?

share|improve this question
You might have referenced Evan's blog (erouault.blogspot.com.au/2012/12/…) since you took the code from it... –  BradHards Sep 21 '13 at 6:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.