OGR
ogr_gensql.h
1 /******************************************************************************
2  * $Id: ogr_gensql.h e37e476c4cf8f4b0df8995e0d95d5d672fca1a9b 2018-05-05 16:54:18 +0200 Even Rouault $
3  *
4  * Project: OpenGIS Simple Features Reference Implementation
5  * Purpose: Classes related to generic implementation of ExecuteSQL().
6  * Author: Frank Warmerdam, warmerdam@pobox.com
7  *
8  ******************************************************************************
9  * Copyright (c) 2002, Frank Warmerdam
10  * Copyright (c) 2010-2013, Even Rouault <even dot rouault at mines-paris dot org>
11  *
12  * Permission is hereby granted, free of charge, to any person obtaining a
13  * copy of this software and associated documentation files (the "Software"),
14  * to deal in the Software without restriction, including without limitation
15  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16  * and/or sell copies of the Software, and to permit persons to whom the
17  * Software is furnished to do so, subject to the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be included
20  * in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28  * DEALINGS IN THE SOFTWARE.
29  ****************************************************************************/
30 
31 #ifndef OGR_GENSQL_H_INCLUDED
32 #define OGR_GENSQL_H_INCLUDED
33 
34 #include "ogrsf_frmts.h"
35 #include "swq.h"
36 #include "cpl_hash_set.h"
37 #include "cpl_string.h"
38 
39 #include <vector>
40 
43 #define GEOM_FIELD_INDEX_TO_ALL_FIELD_INDEX(poFDefn, iGeom) \
44  ((poFDefn)->GetFieldCount() + SPECIAL_FIELD_COUNT + (iGeom))
45 
46 #define IS_GEOM_FIELD_INDEX(poFDefn, idx) \
47  (((idx) >= (poFDefn)->GetFieldCount() + SPECIAL_FIELD_COUNT) && \
48  ((idx) < (poFDefn)->GetFieldCount() + SPECIAL_FIELD_COUNT + (poFDefn)->GetGeomFieldCount()))
49 
50 #define ALL_FIELD_INDEX_TO_GEOM_FIELD_INDEX(poFDefn, idx) \
51  ((idx) - ((poFDefn)->GetFieldCount() + SPECIAL_FIELD_COUNT))
52 
53 /************************************************************************/
54 /* OGRGenSQLResultsLayer */
55 /************************************************************************/
56 
57 class OGRGenSQLResultsLayer final: public OGRLayer
58 {
59  private:
60  GDALDataset *poSrcDS;
61  OGRLayer *poSrcLayer;
62  void *pSelectInfo;
63 
64  char *pszWHERE;
65 
66  OGRLayer **papoTableLayers;
67 
68  OGRFeatureDefn *poDefn;
69 
70  int *panGeomFieldToSrcGeomField;
71 
72  size_t nIndexSize;
73  GIntBig *panFIDIndex;
74  int bOrderByValid;
75 
76  GIntBig nNextIndexFID;
77  OGRFeature *poSummaryFeature;
78 
79  int iFIDFieldIndex;
80 
81  int nExtraDSCount;
82  GDALDataset **papoExtraDS;
83 
84  GIntBig nIteratedFeatures;
85  std::vector<CPLString> m_oDistinctList;
86 
87  int PrepareSummary();
88 
89  OGRFeature *TranslateFeature( OGRFeature * );
90  void CreateOrderByIndex();
91  void ReadIndexFields( OGRFeature* poSrcFeat,
92  int nOrderItems,
93  OGRField *pasIndexFields );
94  void SortIndexSection( const OGRField *pasIndexFields,
95  GIntBig *panMerged,
96  size_t nStart, size_t nEntries );
97  void FreeIndexFields(OGRField *pasIndexFields,
98  size_t l_nIndexSize,
99  bool bFreeArray = true);
100  int Compare( const OGRField *pasFirst, const OGRField *pasSecond );
101 
102  void ClearFilters();
103  void ApplyFiltersToSource();
104 
105  void FindAndSetIgnoredFields();
106  void ExploreExprForIgnoredFields(swq_expr_node* expr, CPLHashSet* hSet);
107  void AddFieldDefnToSet(int iTable, int iColumn, CPLHashSet* hSet);
108 
109  int ContainGeomSpecialField(swq_expr_node* expr);
110 
111  void InvalidateOrderByIndex();
112 
113  int MustEvaluateSpatialFilterOnGenSQL();
114 
115  CPL_DISALLOW_COPY_ASSIGN(OGRGenSQLResultsLayer)
116 
117  public:
118  OGRGenSQLResultsLayer( GDALDataset *poSrcDS,
119  void *pSelectInfo,
120  OGRGeometry *poSpatFilter,
121  const char *pszWHERE,
122  const char *pszDialect );
123  virtual ~OGRGenSQLResultsLayer();
124 
125  virtual OGRGeometry *GetSpatialFilter() override;
126 
127  virtual void ResetReading() override;
128  virtual OGRFeature *GetNextFeature() override;
129  virtual OGRErr SetNextByIndex( GIntBig nIndex ) override;
130  virtual OGRFeature *GetFeature( GIntBig nFID ) override;
131 
132  virtual OGRFeatureDefn *GetLayerDefn() override;
133 
134  virtual GIntBig GetFeatureCount( int bForce = TRUE ) override;
135  virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE) override { return GetExtent(0, psExtent, bForce); }
136  virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE) override;
137 
138  virtual int TestCapability( const char * ) override;
139 
140  virtual void SetSpatialFilter( OGRGeometry * poGeom ) override { SetSpatialFilter(0, poGeom); }
141  virtual void SetSpatialFilter( int iGeomField, OGRGeometry * ) override;
142  virtual OGRErr SetAttributeFilter( const char * ) override;
143 };
144 
147 #endif /* ndef OGR_GENSQL_H_INCLUDED */
OGRSpatialReference::SetAxisMappingStrategy
void SetAxisMappingStrategy(OSRAxisMappingStrategy)
Set the data axis to CRS axis mapping strategy.
Definition: ogrspatialreference.cpp:10635
OGRSpatialReference::GetPrimeMeridian
double GetPrimeMeridian(char **) const CPL_WARN_DEPRECATED("Use GetPrimeMeridian( const char**) instead")
Fetch prime meridian info.
Definition: ogrspatialreference.cpp:2765
OGR_SRSNode::DestroyChild
void DestroyChild(int)
Definition: ogr_srsnode.cpp:322
SRS_PP_CENTRAL_MERIDIAN
#define SRS_PP_CENTRAL_MERIDIAN
Definition: ogr_srs_api.h:247
CPLHashSetHashPointer
unsigned long CPLHashSetHashPointer(const void *elt)
Definition: cpl_hash_set.cpp:514
ogr_spatialref.h
OGRSpatialReference::GetEPSGGeogCS
int GetEPSGGeogCS() const
Definition: ogr_fromepsg.cpp:301
CPLGetLastErrorMsg
const char * CPLGetLastErrorMsg(void)
Definition: cpl_error.cpp:866
OGRFeature::SetFID
virtual OGRErr SetFID(GIntBig nFIDIn)
Set the feature identifier.
Definition: ogrfeature.cpp:5440
OGR_RawField_IsNull
int OGR_RawField_IsNull(const OGRField *)
Returns whether a raw field is null.
Definition: ogrfeature.cpp:6963
cpl_error.h
OGRFeature::SetNativeMediaType
void SetNativeMediaType(const char *pszNativeMediaType)
Sets the native media type for the feature.
Definition: ogrfeature.cpp:6890
OGRSpatialReference::Release
void Release()
Decrements the reference count by one, and destroy if zero.
Definition: ogrspatialreference.cpp:931
CPLEscapeString
char * CPLEscapeString(const char *pszString, int nLength, int nScheme)
Definition: cpl_string.cpp:2036
OGRLayer::GetNextFeature
virtual OGRFeature * GetNextFeature() CPL_WARN_UNUSED_RESULT=0
Fetch the next available feature from this layer.
OGRLayer::ResetReading
virtual void ResetReading()=0
Reset feature reading to start on the first feature.
OFSTBoolean
@ OFSTBoolean
Definition: ogr_core.h:626
CPLString::Printf
CPLSTRING_METHOD_DLL CPLString & Printf(const char *pszFormat,...)
Definition: cplstring.cpp:59
OGRSpatialReference::GetAuthorityCode
const char * GetAuthorityCode(const char *pszTargetKey) const
Get the authority code for a node.
Definition: ogrspatialreference.cpp:7381
VSI_REALLOC_VERBOSE
#define VSI_REALLOC_VERBOSE(pOldPtr, nNewSize)
Definition: cpl_vsi.h:288
CPLHashSetNew
CPLHashSet * CPLHashSetNew(CPLHashSetHashFunc fnHashFunc, CPLHashSetEqualFunc fnEqualFunc, CPLHashSetFreeEltFunc fnFreeEltFunc)
Definition: cpl_hash_set.cpp:91
cpl_hash_set.h
wkbMultiPolygon
@ wkbMultiPolygon
Definition: ogr_core.h:329
OGRSpatialReference::GetAttrValue
const char * GetAttrValue(const char *, int=0) const
Fetch indicated attribute of named node.
Definition: ogrspatialreference.cpp:1099
CPLCalloc
void * CPLCalloc(size_t, size_t)
Definition: cpl_conv.cpp:138
OGRGeometry::FromHandle
static OGRGeometry * FromHandle(OGRGeometryH hGeom)
Definition: ogr_geometry.h:517
OGRFieldDefn::GetWidth
int GetWidth() const
Get the formatting width for this field.
Definition: ogr_feature.h:127
OGR_G_ForceToMultiLineString
OGRGeometryH OGR_G_ForceToMultiLineString(OGRGeometryH) CPL_WARN_UNUSED_RESULT
Convert to multilinestring.
Definition: ogrgeometryfactory.cpp:1295
OGRSpatialReference
Definition: ogr_spatialref.h:156
OGRLayer::GetFeatureCount
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:173
OSRAutoIdentifyEPSG
OGRErr OSRAutoIdentifyEPSG(OGRSpatialReferenceH hSRS)
Set EPSG authority info if possible.
Definition: ogr_fromepsg.cpp:514
OGRFeature::GetFieldAsString
const char * GetFieldAsString(int i) const
Fetch field value as a string.
Definition: ogrfeature.cpp:2297
OFTDateTime
@ OFTDateTime
Definition: ogr_core.h:607
OGRSpatialReference::GetNormProjParm
double GetNormProjParm(const char *, double=0.0, OGRErr *=nullptr) const
Fetch a normalized projection parameter value.
Definition: ogrspatialreference.cpp:4952
OGRGeometry
Definition: ogr_geometry.h:286
OGRSpatialReference::SetLinearUnits
OGRErr SetLinearUnits(const char *pszName, double dfInMeters)
Set the linear units for the projection.
Definition: ogrspatialreference.cpp:2255
OGRFeature::GetGeomFieldDefnRef
OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField)
Fetch definition for this geometry field.
Definition: ogr_feature.h:582
OGRLayer
Definition: ogrsf_frmts.h:70
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:329
OGRSpatialReference::IsProjected
int IsProjected() const
Check if projected coordinate system.
Definition: ogrspatialreference.cpp:7642
OGRFieldDefn::GetPrecision
int GetPrecision() const
Get the formatting precision for this field. This should normally be zero for fields of types other t...
Definition: ogr_feature.h:130
OGRLayer::GetSpatialFilter
virtual OGRGeometry * GetSpatialFilter()
This method returns the current spatial filter for this layer.
Definition: ogrlayer.cpp:1085
OGRFeature::SetNativeData
void SetNativeData(const char *pszNativeData)
Sets the native data for the feature.
Definition: ogrfeature.cpp:6834
CPLRealloc
void * CPLRealloc(void *, size_t)
Definition: cpl_conv.cpp:225
OGRLayer::SetSpatialFilter
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrlayer.cpp:1113
OGRGeomFieldDefn::GetNameRef
const char * GetNameRef() const
Fetch name of this field.
Definition: ogr_feature.h:203
OLCFastFeatureCount
#define OLCFastFeatureCount
Definition: ogr_core.h:756
OGRSpatialReference::GetUTMZone
int GetUTMZone(int *pbNorth=nullptr) const
Get utm zone information.
Definition: ogrspatialreference.cpp:7024
CPL_FRMT_GIB
#define CPL_FRMT_GIB
Definition: cpl_port.h:316
EQUAL
#define EQUAL(a, b)
Definition: cpl_port.h:569
OGRFieldDefn::GetNameRef
const char * GetNameRef() const
Fetch name of this field.
Definition: ogr_feature.h:113
OGRLayer::GetLayerDefn
virtual OGRFeatureDefn * GetLayerDefn()=0
Fetch the schema information for this layer.
OGRFeatureDefn::GetFieldDefn
virtual OGRFieldDefn * GetFieldDefn(int i)
Fetch field definition.
Definition: ogrfeaturedefn.cpp:330
OGRSpatialReference::SetStatePlane
OGRErr SetStatePlane(int nZone, int bNAD83=TRUE, const char *pszOverrideUnitName=nullptr, double dfOverrideUnit=0.0)
Set State Plane projection definition.
Definition: ogr_fromepsg.cpp:151
wkbFlatten
#define wkbFlatten(x)
Definition: ogr_core.h:440
OGRSpatialReference::GetAuthorityName
const char * GetAuthorityName(const char *pszTargetKey) const
Get the authority name for a node.
Definition: ogrspatialreference.cpp:7465
OGR_RawField_IsUnset
int OGR_RawField_IsUnset(const OGRField *)
Returns whether a raw field is unset.
Definition: ogrfeature.cpp:6942
CPLAssert
#define CPLAssert(expr)
Definition: cpl_error.h:186
CPLHashSetInsert
int CPLHashSetInsert(CPLHashSet *set, void *elt)
Definition: cpl_hash_set.cpp:355
OGRFeature::SetField
void SetField(int i, int nValue)
Set field to integer value.
Definition: ogrfeature.cpp:3415
OGRERR_UNSUPPORTED_SRS
#define OGRERR_UNSUPPORTED_SRS
Definition: ogr_core.h:299
SRS_PP_SCALE_FACTOR
#define SRS_PP_SCALE_FACTOR
Definition: ogr_srs_api.h:249
CPLES_SQL
#define CPLES_SQL
Definition: cpl_string.h:173
OGRSpatialReferenceH
void * OGRSpatialReferenceH
Definition: ogr_api.h:74
OGRGeomFieldDefn::GetSpatialRef
virtual OGRSpatialReference * GetSpatialRef() const
Fetch spatial reference system of this field.
Definition: ogrgeomfielddefn.cpp:438
OGRLayer::GetFeature
virtual OGRFeature * GetFeature(GIntBig nFID) CPL_WARN_UNUSED_RESULT
Fetch a feature by its identifier.
Definition: ogrlayer.cpp:447
OGRField
Definition: ogr_core.h:683
OGRFeature::GetDefnRef
OGRFeatureDefn * GetDefnRef()
Fetch feature definition.
Definition: ogr_feature.h:571
OGRFeatureDefn::GetGeomFieldDefn
virtual OGRGeomFieldDefn * GetGeomFieldDefn(int i)
Fetch geometry field definition.
Definition: ogrfeaturedefn.cpp:681
OAMS_TRADITIONAL_GIS_ORDER
@ OAMS_TRADITIONAL_GIS_ORDER
Definition: ogr_srs_api.h:653
OGRFeature::GetStyleString
virtual const char * GetStyleString() const
Fetch style string for this feature.
Definition: ogrfeature.cpp:6117
OGRFeatureDefn::GetFieldCount
virtual int GetFieldCount() const
Fetch number of fields on this feature.
Definition: ogrfeaturedefn.cpp:286
GUIntBig
unsigned long long GUIntBig
Definition: cpl_port.h:251
CPLHashSetDestroy
void CPLHashSetDestroy(CPLHashSet *set)
Definition: cpl_hash_set.cpp:207
SRS_PP_LATITUDE_OF_ORIGIN
#define SRS_PP_LATITUDE_OF_ORIGIN
Definition: ogr_srs_api.h:263
CPLE_OpenFailed
#define CPLE_OpenFailed
Definition: cpl_error.h:105
VALIDATE_POINTER1
#define VALIDATE_POINTER1(ptr, func, rc)
Definition: cpl_error.h:276
OGRERR_FAILURE
#define OGRERR_FAILURE
Definition: ogr_core.h:298
OFTString
@ OFTString
Definition: ogr_core.h:600
ogrsf_frmts.h
OGRSpatialReference::Clear
void Clear()
Wipe current definition.
Definition: ogrspatialreference.cpp:790
CPLDebug
void CPLDebug(const char *, const char *,...)
Definition: cpl_error.cpp:602
OGRLayer::GetExtent
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE) CPL_WARN_UNUSED_RESULT
Fetch the extent of this layer.
Definition: ogrlayer.cpp:211
OGRFieldDefn
Definition: ogr_feature.h:92
ogr_srs_api.h
OGRFeature::SetStyleString
virtual void SetStyleString(const char *)
Set feature style string.
Definition: ogrfeature.cpp:6169
OFTInteger
@ OFTInteger
Definition: ogr_core.h:596
OGRFeature::GetFieldAsDouble
double GetFieldAsDouble(int i) const
Fetch field value as a double.
Definition: ogrfeature.cpp:2116
OLMD_FID64
#define OLMD_FID64
Definition: ogr_core.h:791
CPLMalloc
void * CPLMalloc(size_t)
Definition: cpl_conv.cpp:168
SRS_PT_POLAR_STEREOGRAPHIC
#define SRS_PT_POLAR_STEREOGRAPHIC
Definition: ogr_srs_api.h:164
cpl_conv.h
wkbNone
@ wkbNone
Definition: ogr_core.h:349
CPLHashSetEqualPointer
int CPLHashSetEqualPointer(const void *elt1, const void *elt2)
Definition: cpl_hash_set.cpp:533
OGR_G_ForceToLineString
OGRGeometryH OGR_G_ForceToLineString(OGRGeometryH) CPL_WARN_UNUSED_RESULT
Convert to line string.
Definition: ogrgeometryfactory.cpp:4214
wkbPolygon
@ wkbPolygon
Definition: ogr_core.h:324
cpl_string.h
SRS_UL_METER
#define SRS_UL_METER
Definition: ogr_srs_api.h:314
CPLSPrintf
const char * CPLSPrintf(const char *fmt,...)
Definition: cpl_string.cpp:977
OFSTNone
@ OFSTNone
Definition: ogr_core.h:624
OGRSpatialReference::importFromEPSG
OGRErr importFromEPSG(int)
Initialize SRS based on EPSG geographic, projected or vertical CRS code.
Definition: ogrspatialreference.cpp:10220
CPLError
void CPLError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...)
Definition: cpl_error.cpp:308
OGRGeomFieldDefn
Definition: ogr_feature.h:182
VSIFree
void VSIFree(void *)
Definition: cpl_vsisimple.cpp:827
OGRSpatialReference::GetLinearUnits
double GetLinearUnits(char **) const CPL_WARN_DEPRECATED("Use GetLinearUnits( const char**) instead")
Fetch linear projection units.
Definition: ogrspatialreference.cpp:2430
OFTTime
@ OFTTime
Definition: ogr_core.h:606
OGRFieldDefn::GetType
OGRFieldType GetType() const
Fetch type of this field.
Definition: ogr_feature.h:115
OGRFeature::IsFieldSetAndNotNull
bool IsFieldSetAndNotNull(int iField) const
Test if a field is set and not null.
Definition: ogrfeature.cpp:1583
OGRErr
int OGRErr
Definition: ogr_core.h:290
OGRSpatialReference::SetAuthority
OGRErr SetAuthority(const char *pszTargetKey, const char *pszAuthority, int nCode)
Set the authority for a node.
Definition: ogrspatialreference.cpp:7245
_CPLHashSet
Definition: cpl_hash_set.cpp:40
CSLDestroy
void CSLDestroy(char **papszStrList)
Definition: cpl_string.cpp:200
GIntBig
long long GIntBig
Definition: cpl_port.h:248
OGRFeature::GetFieldDefnRef
const OGRFieldDefn * GetFieldDefnRef(int iField) const
Fetch definition for this field.
Definition: ogr_feature.h:602
VSI_MALLOC_VERBOSE
#define VSI_MALLOC_VERBOSE(size)
Definition: cpl_vsi.h:268
OGRwkbGeometryType
OGRwkbGeometryType
Definition: ogr_core.h:317
SRS_PP_FALSE_EASTING
#define SRS_PP_FALSE_EASTING
Definition: ogr_srs_api.h:265
OGRFeature::GetRawFieldRef
OGRField * GetRawFieldRef(int i)
Fetch a pointer to the internal field value given the index.
Definition: ogr_feature.h:619
OLCRandomRead
#define OLCRandomRead
Definition: ogr_core.h:752
OFTDate
@ OFTDate
Definition: ogr_core.h:605
OGRFeature
Definition: ogr_feature.h:354
cpl_port.h
OGRGeomFieldDefn::GetType
OGRwkbGeometryType GetType() const
Fetch geometry type of this field.
Definition: ogr_feature.h:205
OGRFeature::GetNativeMediaType
const char * GetNativeMediaType() const
Returns the native media type for the feature.
Definition: ogr_feature.h:746
ogr_api.h
OGRFeature::SetGeomField
OGRErr SetGeomField(int iField, const OGRGeometry *)
Set feature geometry of a specified geometry field.
Definition: ogrfeature.cpp:880
OLCFastGetExtent
#define OLCFastGetExtent
Definition: ogr_core.h:757
OGR_SRSNode::FindChild
int FindChild(const char *) const
Definition: ogr_srsnode.cpp:354
SRS_UL_US_FOOT_CONV
#define SRS_UL_US_FOOT_CONV
Definition: ogr_srs_api.h:322
wkbGeometryCollection
@ wkbGeometryCollection
Definition: ogr_core.h:330
OGRFieldType
OGRFieldType
Definition: ogr_core.h:594
OGRFeatureDefn::GetGeomFieldCount
virtual int GetGeomFieldCount() const
Fetch number of geometry fields on this feature.
Definition: ogrfeaturedefn.cpp:632
OGR_G_ForceToMultiPolygon
OGRGeometryH OGR_G_ForceToMultiPolygon(OGRGeometryH) CPL_WARN_UNUSED_RESULT
Convert to multipolygon.
Definition: ogrgeometryfactory.cpp:963
OGRLayer::SetNextByIndex
virtual OGRErr SetNextByIndex(GIntBig nIndex)
Move read cursor to the nIndex'th feature in the current resultset.
Definition: ogrlayer.cpp:499
OGRSpatialReference::GetAttrNode
OGR_SRSNode * GetAttrNode(const char *)
Find named node in tree.
Definition: ogrspatialreference.cpp:1019
OGRLayer::SetIgnoredFields
virtual OGRErr SetIgnoredFields(const char **papszFields)
Set which fields can be omitted when retrieving features from the layer.
Definition: ogrlayer.cpp:1792
CSLAddString
char ** CSLAddString(char **papszStrList, const char *pszNewString)
Definition: cpl_string.cpp:83
OFTInteger64
@ OFTInteger64
Definition: ogr_core.h:608
OGRFeature::GetFieldAsInteger64
GIntBig GetFieldAsInteger64(int i) const
Fetch field value as integer 64 bit.
Definition: ogrfeature.cpp:1998
OGRFeature::GetFieldAsInteger
int GetFieldAsInteger(int i) const
Fetch field value as integer.
Definition: ogrfeature.cpp:1859
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:259
CPLAtof
double CPLAtof(const char *)
Definition: cpl_strtod.cpp:117
OGR_SRSNode
Definition: ogr_spatialref.h:66
OGRLayer::SetAttributeFilter
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:338
OLCFastSetNextByIndex
#define OLCFastSetNextByIndex
Definition: ogr_core.h:764
wkbLineString
@ wkbLineString
Definition: ogr_core.h:322
OGRFeature::GetGeomFieldRef
OGRGeometry * GetGeomFieldRef(int iField)
Fetch pointer to feature geometry.
Definition: ogrfeature.cpp:666
wkbMultiLineString
@ wkbMultiLineString
Definition: ogr_core.h:328
OSRSetStatePlaneWithUnits
OGRErr OSRSetStatePlaneWithUnits(OGRSpatialReferenceH hSRS, int nZone, int bNAD83, const char *pszOverrideUnitName, double dfOverrideUnit)
Set State Plane projection definition.
Definition: ogr_fromepsg.cpp:275
OGRLayer::TestCapability
virtual int TestCapability(const char *)=0
Test if this layer supported the named capability.
OGRSpatialReference::AutoIdentifyEPSG
OGRErr AutoIdentifyEPSG()
Set EPSG authority info if possible.
Definition: ogr_fromepsg.cpp:398
SRS_PP_FALSE_NORTHING
#define SRS_PP_FALSE_NORTHING
Definition: ogr_srs_api.h:267
OFTReal
@ OFTReal
Definition: ogr_core.h:598
OGRSpatialReference::SetLocalCS
OGRErr SetLocalCS(const char *)
Set the user visible LOCAL_CS name.
Definition: ogrspatialreference.cpp:4305
ogr_core.h
OGRFieldDefn::GetSubType
OGRFieldSubType GetSubType() const
Fetch subtype of this field.
Definition: ogr_feature.h:119
OGRSpatialReference::GetProjParm
double GetProjParm(const char *, double=0.0, OGRErr *=nullptr) const
Fetch a projection parameter value.
Definition: ogrspatialreference.cpp:4879
OSRSetStatePlane
OGRErr OSRSetStatePlane(OGRSpatialReferenceH hSRS, int nZone, int bNAD83)
Set State Plane projection definition.
Definition: ogr_fromepsg.cpp:256
OGRSpatialReference::IsGeographic
int IsGeographic() const
Check if geographic coordinate system.
Definition: ogrspatialreference.cpp:7760
CPLFree
#define CPLFree
Definition: cpl_conv.h:81
wkbUnknown
@ wkbUnknown
Definition: ogr_core.h:319
CPL_DISALLOW_COPY_ASSIGN
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Definition: cpl_port.h:997
OGRSpatialReference::SetNormProjParm
OGRErr SetNormProjParm(const char *, double)
Set a projection parameter with a normalized value.
Definition: ogrspatialreference.cpp:5018
OGRFeature::GetNativeData
const char * GetNativeData() const
Returns the native data for the feature.
Definition: ogr_feature.h:745
CPLHashSetLookup
void * CPLHashSetLookup(CPLHashSet *set, const void *elt)
Definition: cpl_hash_set.cpp:405
OGRFeature::GetFID
GIntBig GetFID() const
Get feature identifier.
Definition: ogr_feature.h:712
OGR_G_ForceToPolygon
OGRGeometryH OGR_G_ForceToPolygon(OGRGeometryH) CPL_WARN_UNUSED_RESULT
Convert to polygon.
Definition: ogrgeometryfactory.cpp:793
OGRGeometry::ToHandle
static OGRGeometryH ToHandle(OGRGeometry *poGeom)
Definition: ogr_geometry.h:511
CPLE_AppDefined
#define CPLE_AppDefined
Definition: cpl_error.h:99
SRS_UL_US_FOOT
#define SRS_UL_US_FOOT
Definition: ogr_srs_api.h:320

Generated for GDAL by doxygen 1.8.17.