OGR
ogr_geocoding.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: ogr_geocoding.h 34931 2016-08-05 17:13:05Z rouault $
3  *
4  * Project: OpenGIS Simple Features Reference Implementation
5  * Purpose: Client of geocoding service.
6  * Author: Even Rouault, <even dot rouault at mines dash paris dot org>
7  *
8  ******************************************************************************
9  * Copyright (c) 2012, Even Rouault <even dot rouault at mines-paris dot org>
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  ****************************************************************************/
29 
30 #ifndef OGR_GEOCODING_H_INCLUDED
31 #define OGR_GEOCODING_H_INCLUDED
32 
33 #include "cpl_port.h"
34 #include "ogr_api.h"
35 
43 
46 
47 OGRGeocodingSessionH CPL_DLL OGRGeocodeCreateSession(char** papszOptions);
48 
49 void CPL_DLL OGRGeocodeDestroySession(OGRGeocodingSessionH hSession);
50 
52  const char* pszQuery,
53  char** papszStructuredQuery,
54  char** papszOptions);
55 
57  double dfLon, double dfLat,
58  char** papszOptions);
59 
60 void CPL_DLL OGRGeocodeFreeResult(OGRLayerH hLayer);
61 
63 
64 #endif // OGR_GEOCODING_H_INCLUDED
OGRLayer::GetName
virtual const char * GetName()
Return the layer name.
Definition: ogrlayer.cpp:1716
OGRLayer::CreateField
virtual OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK=TRUE)
Create a new field on a layer.
Definition: ogrlayer.cpp:662
CPLGetXMLValue
const char * CPLGetXMLValue(CPLXMLNode *poRoot, const char *pszPath, const char *pszDefault)
Fetch element/attribute value.
Definition: cpl_minixml.cpp:1645
OGRGeocodeCreateSession
OGRGeocodingSessionH OGRGeocodeCreateSession(char **papszOptions)
Creates a session handle for geocoding requests.
Definition: ogr_geocoding.cpp:253
CXT_Element
@ CXT_Element
Definition: cpl_minixml.h:46
cpl_error.h
OGRFeature::SetGeometryDirectly
OGRErr SetGeometryDirectly(OGRGeometry *)
Set feature geometry.
Definition: ogrfeature.cpp:351
CPLEscapeString
char * CPLEscapeString(const char *pszString, int nLength, int nScheme)
Definition: cpl_string.cpp:2018
wkbPoint
@ wkbPoint
Definition: ogr_core.h:316
OGRLayer::GetNextFeature
virtual OGRFeature * GetNextFeature() CPL_WARN_UNUSED_RESULT=0
Fetch the next available feature from this layer.
CPLHTTPDestroyResult
void CPLHTTPDestroyResult(CPLHTTPResult *psResult)
Clean the memory associated with the return value of CPLHTTPFetch()
Definition: cpl_http.cpp:927
CPLCalloc
void * CPLCalloc(size_t, size_t)
Definition: cpl_conv.cpp:128
OGRRegisterAll
void OGRRegisterAll(void)
Register all drivers.
Definition: ogrregisterall.cpp:38
cpl_minixml.h
CPLPopErrorHandler
void CPLPopErrorHandler(void)
Definition: cpl_error.cpp:1141
CPLSearchXMLNode
CPLXMLNode * CPLSearchXMLNode(CPLXMLNode *poRoot, const char *pszTarget)
Search for a node in document.
Definition: cpl_minixml.cpp:1468
OGRGeocodeDestroySession
void OGRGeocodeDestroySession(OGRGeocodingSessionH hSession)
Destroys a session handle for geocoding requests.
Definition: ogr_geocoding.cpp:392
OGRGeometry
Definition: ogr_geometry.h:118
OGRSFDriverH
void * OGRSFDriverH
Definition: ogr_api.h:501
OGRLayer
Definition: ogrsf_frmts.h:68
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:338
OGROpen
OGRDataSourceH OGROpen(const char *, int, OGRSFDriverH *) CPL_WARN_UNUSED_RESULT
Open a file / data source with one of the registered drivers.
CPLParseXMLString
CPLXMLNode * CPLParseXMLString(const char *)
Parse an XML string into tree form.
Definition: cpl_minixml.cpp:614
OGRPoint
Definition: ogr_geometry.h:322
ogr_geometry.h
CPLAtofM
double CPLAtofM(const char *)
Definition: cpl_strtod.cpp:142
CPLXMLNode
Definition: cpl_minixml.h:66
EQUAL
#define EQUAL(a, b)
Definition: cpl_port.h:622
OGRLayer::GetLayerDefn
virtual OGRFeatureDefn * GetLayerDefn()=0
Fetch the schema information for this layer.
cpl_http.h
CPLPushErrorHandler
void CPLPushErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:1084
CPL_C_START
#define CPL_C_START
Definition: cpl_port.h:352
OGRFeature::SetField
void SetField(int i, int nValue)
Set field to integer value.
Definition: ogrfeature.cpp:3208
CPLES_SQL
#define CPLES_SQL
Definition: cpl_string.h:204
OGRGeocodingSessionH
struct _OGRGeocodingSessionHS * OGRGeocodingSessionH
Definition: ogr_geocoding.h:45
OGRGeocodeFreeResult
void OGRGeocodeFreeResult(OGRLayerH hLayer)
Destroys the result of a geocoding request.
Definition: ogr_geocoding.cpp:1602
CPLSerializeXMLTree
char * CPLSerializeXMLTree(const CPLXMLNode *psNode)
Convert tree into string document.
Definition: cpl_minixml.cpp:1252
CPLTestBool
bool CPLTestBool(const char *pszValue)
Definition: cpl_string.cpp:1522
CPLGetXMLNode
CPLXMLNode * CPLGetXMLNode(CPLXMLNode *poRoot, const char *pszPath)
Find node by path.
Definition: cpl_minixml.cpp:1557
OGRFeature::GetGeometryRef
OGRGeometry * GetGeometryRef()
Fetch pointer to feature geometry.
Definition: ogrfeature.cpp:569
OGRGetDriverByName
OGRSFDriverH OGRGetDriverByName(const char *)
Fetch the indicated driver.
CPLES_URL
#define CPLES_URL
Definition: cpl_string.h:202
GUIntBig
unsigned long long GUIntBig
Definition: cpl_port.h:253
CPLHTTPResult
Definition: cpl_http.h:55
VALIDATE_POINTER1
#define VALIDATE_POINTER1(ptr, func, rc)
Definition: cpl_error.h:208
CPLHTTPResult::pabyData
GByte * pabyData
Definition: cpl_http.h:71
OFTString
@ OFTString
Definition: ogr_core.h:590
_OGRGeocodingSessionHS
Definition: ogr_geocoding.cpp:91
CPLXMLNode::eType
CPLXMLNodeType eType
Node type.
Definition: cpl_minixml.h:74
CSLFetchNameValue
const char * CSLFetchNameValue(const char *const *papszStrList, const char *pszName)
Definition: cpl_string.cpp:1670
ogrsf_frmts.h
CPLDestroyXMLNode
void CPLDestroyXMLNode(CPLXMLNode *)
Destroy a tree.
Definition: cpl_minixml.cpp:1412
CPL_C_END
#define CPL_C_END
Definition: cpl_port.h:354
OGRLayer::CreateFeature
OGRErr CreateFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT
Create and write a new feature within a layer.
Definition: ogrlayer.cpp:623
CPLDebug
void CPLDebug(const char *, const char *,...)
Definition: cpl_error.cpp:492
OGRDataSourceH
void * OGRDataSourceH
Definition: ogr_api.h:499
OGRFieldDefn
Definition: ogr_feature.h:62
OFTInteger
@ OFTInteger
Definition: ogr_core.h:586
ogr_feature.h
cpl_conv.h
wkbNone
@ wkbNone
Definition: ogr_core.h:344
cpl_string.h
CPLSPrintf
const char * CPLSPrintf(const char *fmt,...)
Definition: cpl_string.cpp:975
OGRDataSource
Definition: ogrsf_frmts.h:247
OGRFeatureDefn::GetFieldIndex
virtual int GetFieldIndex(const char *)
Find field by name.
Definition: ogrfeaturedefn.cpp:1144
OGRFeature::IsFieldSetAndNotNull
bool IsFieldSetAndNotNull(int iField)
Test if a field is set and not null.
Definition: ogrfeature.cpp:1464
CSLAddNameValue
char ** CSLAddNameValue(char **papszStrList, const char *pszName, const char *pszValue)
Definition: cpl_string.cpp:1834
CPLError
void CPLError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...)
Definition: cpl_error.cpp:215
OGRGeometryFactory::createFromWkt
static OGRErr createFromWkt(char **, OGRSpatialReference *, OGRGeometry **)
Create a geometry object of the appropriate type from it's well known text representation.
Definition: ogrgeometryfactory.cpp:270
CPLE_NotSupported
#define CPLE_NotSupported
Definition: cpl_error.h:110
CXT_Attribute
@ CXT_Attribute
Definition: cpl_minixml.h:48
OGRGetDriverCount
int OGRGetDriverCount(void)
Fetch the number of registered drivers.
CSLDestroy
void CSLDestroy(char **papszStrList)
Definition: cpl_string.cpp:200
OGRReleaseDataSource
OGRErr OGRReleaseDataSource(OGRDataSourceH)
Drop a reference to this datasource, and if the reference count drops to zero close (destroy) the dat...
CPLXMLNode::psNext
struct CPLXMLNode * psNext
Next sibling.
Definition: cpl_minixml.h:106
OGRFeature
Definition: ogr_feature.h:279
cpl_port.h
ogr_api.h
OGRGeocode
OGRLayerH OGRGeocode(OGRGeocodingSessionH hSession, const char *pszQuery, char **papszStructuredQuery, char **papszOptions)
Runs a geocoding request.
Definition: ogr_geocoding.cpp:1427
OGRERR_NONE
#define OGRERR_NONE
Definition: ogr_core.h:287
CPLStrdup
char * CPLStrdup(const char *)
Definition: cpl_conv.cpp:284
OGRFeatureDefn
Definition: ogr_feature.h:207
CPLXMLNode::pszValue
char * pszValue
Node value.
Definition: cpl_minixml.h:97
CPLXMLNode::psChild
struct CPLXMLNode * psChild
Child node.
Definition: cpl_minixml.h:118
OGRLayer::SetAttributeFilter
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:337
OGRFeature::DestroyFeature
static void DestroyFeature(OGRFeature *)
Destroy feature.
Definition: ogrfeature.cpp:280
CPLQuietErrorHandler
void CPLQuietErrorHandler(CPLErr, CPLErrorNum, const char *)
Definition: cpl_error.cpp:866
OGRFeature::GetFieldAsString
const char * GetFieldAsString(int i)
Fetch field value as a string.
Definition: ogrfeature.cpp:2090
OFTReal
@ OFTReal
Definition: ogr_core.h:588
ogr_core.h
OGRLayerH
void * OGRLayerH
Definition: ogr_api.h:497
CPLFree
#define CPLFree
Definition: cpl_conv.h:81
wkbUnknown
@ wkbUnknown
Definition: ogr_core.h:314
CPLHTTPFetch
CPLHTTPResult * CPLHTTPFetch(const char *pszURL, char **papszOptions)
Fetch a document from an url and return in a string.
Definition: cpl_http.cpp:246
CPLGetExtension
const char * CPLGetExtension(const char *)
Definition: cpl_path.cpp:345
OGR_Dr_CreateDataSource
OGRDataSourceH OGR_Dr_CreateDataSource(OGRSFDriverH, const char *, char **) CPL_WARN_UNUSED_RESULT
This function attempts to create a new data source based on the passed driver.
CPLGetConfigOption
const char * CPLGetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1625
OGRGeocodeReverse
OGRLayerH OGRGeocodeReverse(OGRGeocodingSessionH hSession, double dfLon, double dfLat, char **papszOptions)
Runs a reverse geocoding request.
Definition: ogr_geocoding.cpp:1560
CPLSetThreadLocalConfigOption
void CPLSetThreadLocalConfigOption(const char *pszKey, const char *pszValue)
Definition: cpl_conv.cpp:1814
STARTS_WITH_CI
#define STARTS_WITH_CI(a, b)
Definition: cpl_port.h:633
CPLE_AppDefined
#define CPLE_AppDefined
Definition: cpl_error.h:100
ogr_geocoding.h

Generated for GDAL by doxygen 1.8.17.