OGR
ogr_geocoding.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: ogr_geocoding.h fcf615cbf6b2e03db17171af0ebba6da4b4a562d 2016-08-05 17:13:05Z Even 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:1728
OGRLayer::CreateField
virtual OGRErr CreateField(OGRFieldDefn *poField, int bApproxOK=TRUE)
Create a new field on a layer.
Definition: ogrlayer.cpp:665
OGRGeocodeCreateSession
OGRGeocodingSessionH OGRGeocodeCreateSession(char **papszOptions)
Creates a session handle for geocoding requests.
Definition: ogr_geocoding.cpp:253
CPLHTTPFetch
CPLHTTPResult * CPLHTTPFetch(const char *pszURL, CSLConstList papszOptions)
Fetch a document from an url and return in a string.
Definition: cpl_http.cpp:648
CXT_Element
@ CXT_Element
Definition: cpl_minixml.h:46
cpl_error.h
OGRFeature::SetGeometryDirectly
OGRErr SetGeometryDirectly(OGRGeometry *)
Set feature geometry.
Definition: ogrfeature.cpp:364
CPLEscapeString
char * CPLEscapeString(const char *pszString, int nLength, int nScheme)
Definition: cpl_string.cpp:2036
wkbPoint
@ wkbPoint
Definition: ogr_core.h:321
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:2080
CPLCalloc
void * CPLCalloc(size_t, size_t)
Definition: cpl_conv.cpp:138
OGRRegisterAll
void OGRRegisterAll(void)
Register all drivers.
Definition: ogrregisterall.cpp:38
cpl_minixml.h
CPLPopErrorHandler
void CPLPopErrorHandler(void)
Definition: cpl_error.cpp:1242
CPLSearchXMLNode
CPLXMLNode * CPLSearchXMLNode(CPLXMLNode *poRoot, const char *pszTarget)
Search for a node in document.
Definition: cpl_minixml.cpp:1461
OGRFeature::GetFieldAsString
const char * GetFieldAsString(int i) const
Fetch field value as a string.
Definition: ogrfeature.cpp:2297
OGRGeocodeDestroySession
void OGRGeocodeDestroySession(OGRGeocodingSessionH hSession)
Destroys a session handle for geocoding requests.
Definition: ogr_geocoding.cpp:392
OGRGeometry
Definition: ogr_geometry.h:287
OGRSFDriverH
void * OGRSFDriverH
Definition: ogr_api.h:513
OGRLayer
Definition: ogrsf_frmts.h:71
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:330
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:811
ogr_geometry.h
CPLAtofM
double CPLAtofM(const char *)
Definition: cpl_strtod.cpp:142
CPLXMLNode
Definition: cpl_minixml.h:67
EQUAL
#define EQUAL(a, b)
Definition: cpl_port.h:569
OGRLayer::GetLayerDefn
virtual OGRFeatureDefn * GetLayerDefn()=0
Fetch the schema information for this layer.
cpl_http.h
CPLPushErrorHandler
void CPLPushErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:1185
CPL_C_START
#define CPL_C_START
Definition: cpl_port.h:337
OGRFeature::SetField
void SetField(int i, int nValue)
Set field to integer value.
Definition: ogrfeature.cpp:3415
CPLES_SQL
#define CPLES_SQL
Definition: cpl_string.h:173
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:1601
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:1526
CPLGetXMLNode
CPLXMLNode * CPLGetXMLNode(CPLXMLNode *poRoot, const char *pszPath)
Find node by path.
Definition: cpl_minixml.cpp:1550
OGRFeature::GetGeometryRef
OGRGeometry * GetGeometryRef()
Fetch pointer to feature geometry.
Definition: ogrfeature.cpp:583
OGRGetDriverByName
OGRSFDriverH OGRGetDriverByName(const char *)
Fetch the indicated driver.
CPLES_URL
#define CPLES_URL
Definition: cpl_string.h:171
GUIntBig
unsigned long long GUIntBig
Definition: cpl_port.h:251
CPLHTTPResult
Definition: cpl_http.h:66
VALIDATE_POINTER1
#define VALIDATE_POINTER1(ptr, func, rc)
Definition: cpl_error.h:276
CPLHTTPResult::pabyData
GByte * pabyData
Definition: cpl_http.h:82
OFTString
@ OFTString
Definition: ogr_core.h:600
_OGRGeocodingSessionHS
Definition: ogr_geocoding.cpp:92
CPLXMLNode::eType
CPLXMLNodeType eType
Node type.
Definition: cpl_minixml.h:74
ogrsf_frmts.h
CPLDestroyXMLNode
void CPLDestroyXMLNode(CPLXMLNode *)
Destroy a tree.
Definition: cpl_minixml.cpp:1405
CPL_C_END
#define CPL_C_END
Definition: cpl_port.h:339
OGRLayer::CreateFeature
OGRErr CreateFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT
Create and write a new feature within a layer.
Definition: ogrlayer.cpp:626
CPLDebug
void CPLDebug(const char *, const char *,...)
Definition: cpl_error.cpp:602
OGRDataSourceH
void * OGRDataSourceH
Definition: ogr_api.h:511
OGRFieldDefn
Definition: ogr_feature.h:93
OFTInteger
@ OFTInteger
Definition: ogr_core.h:596
ogr_feature.h
cpl_conv.h
wkbNone
@ wkbNone
Definition: ogr_core.h:349
cpl_string.h
CPLSPrintf
const char * CPLSPrintf(const char *fmt,...)
Definition: cpl_string.cpp:977
OGRDataSource
Definition: ogrsf_frmts.h:318
CPLGetXMLValue
const char * CPLGetXMLValue(const CPLXMLNode *poRoot, const char *pszPath, const char *pszDefault)
Fetch element/attribute value.
Definition: cpl_minixml.cpp:1638
CSLAddNameValue
char ** CSLAddNameValue(char **papszStrList, const char *pszName, const char *pszValue)
Definition: cpl_string.cpp:1838
CPLError
void CPLError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...)
Definition: cpl_error.cpp:308
CPLE_NotSupported
#define CPLE_NotSupported
Definition: cpl_error.h:109
CXT_Attribute
@ CXT_Attribute
Definition: cpl_minixml.h:48
OGRGetDriverCount
int OGRGetDriverCount(void)
Fetch the number of registered drivers.
OGRFeatureDefn::GetFieldIndex
virtual int GetFieldIndex(const char *) const
Find field by name.
Definition: ogrfeaturedefn.cpp:1218
OGRFeature::IsFieldSetAndNotNull
bool IsFieldSetAndNotNull(int iField) const
Test if a field is set and not null.
Definition: ogrfeature.cpp:1583
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:355
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:1426
CSLFetchNameValue
const char * CSLFetchNameValue(CSLConstList papszStrList, const char *pszName)
Definition: cpl_string.cpp:1674
OGRERR_NONE
#define OGRERR_NONE
Definition: ogr_core.h:292
CPLStrdup
char * CPLStrdup(const char *)
Definition: cpl_conv.cpp:293
OGRFeatureDefn
Definition: ogr_feature.h:260
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:338
OGRFeature::DestroyFeature
static void DestroyFeature(OGRFeature *)
Destroy feature.
Definition: ogrfeature.cpp:282
CPLQuietErrorHandler
void CPLQuietErrorHandler(CPLErr, CPLErrorNum, const char *)
Definition: cpl_error.cpp:967
OFTReal
@ OFTReal
Definition: ogr_core.h:598
ogr_core.h
OGRLayerH
void * OGRLayerH
Definition: ogr_api.h:509
CPLFree
#define CPLFree
Definition: cpl_conv.h:81
wkbUnknown
@ wkbUnknown
Definition: ogr_core.h:319
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:1692
OGRGeocodeReverse
OGRLayerH OGRGeocodeReverse(OGRGeocodingSessionH hSession, double dfLon, double dfLat, char **papszOptions)
Runs a reverse geocoding request.
Definition: ogr_geocoding.cpp:1559
CPLSetThreadLocalConfigOption
void CPLSetThreadLocalConfigOption(const char *pszKey, const char *pszValue)
Definition: cpl_conv.cpp:1885
OGRGeometryFactory::createFromWkt
static OGRErr createFromWkt(const char *, OGRSpatialReference *, OGRGeometry **)
Create a geometry object of the appropriate type from its well known text representation.
Definition: ogrgeometryfactory.cpp:464
STARTS_WITH_CI
#define STARTS_WITH_CI(a, b)
Definition: cpl_port.h:580
CPLE_AppDefined
#define CPLE_AppDefined
Definition: cpl_error.h:99
ogr_geocoding.h

Generated for GDAL by doxygen 1.8.20.