OGR
ogr_gensql.h
1 /******************************************************************************
2  * $Id: ogr_gensql.h 37576 2017-03-03 14:29:55Z 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 CPL_DLL OGRGenSQLResultsLayer : 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  public:
116  OGRGenSQLResultsLayer( GDALDataset *poSrcDS,
117  void *pSelectInfo,
118  OGRGeometry *poSpatFilter,
119  const char *pszWHERE,
120  const char *pszDialect );
121  virtual ~OGRGenSQLResultsLayer();
122 
123  virtual OGRGeometry *GetSpatialFilter() override;
124 
125  virtual void ResetReading() override;
126  virtual OGRFeature *GetNextFeature() override;
127  virtual OGRErr SetNextByIndex( GIntBig nIndex ) override;
128  virtual OGRFeature *GetFeature( GIntBig nFID ) override;
129 
130  virtual OGRFeatureDefn *GetLayerDefn() override;
131 
132  virtual GIntBig GetFeatureCount( int bForce = TRUE ) override;
133  virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE) override { return GetExtent(0, psExtent, bForce); }
134  virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE) override;
135 
136  virtual int TestCapability( const char * ) override;
137 
138  virtual void SetSpatialFilter( OGRGeometry * poGeom ) override { SetSpatialFilter(0, poGeom); }
139  virtual void SetSpatialFilter( int iGeomField, OGRGeometry * ) override;
140  virtual OGRErr SetAttributeFilter( const char * ) override;
141 };
142 
145 #endif /* ndef OGR_GENSQL_H_INCLUDED */
OGRSpatialReference::GetRoot
OGR_SRSNode * GetRoot()
Return root node.
Definition: ogr_spatialref.h:233
OGR_SRSNode::DestroyChild
void DestroyChild(int)
Definition: ogr_srsnode.cpp:291
SRS_PP_CENTRAL_MERIDIAN
#define SRS_PP_CENTRAL_MERIDIAN
Definition: ogr_srs_api.h:269
SRS_UA_DEGREE_CONV
#define SRS_UA_DEGREE_CONV
Definition: ogr_srs_api.h:446
OGR_SRSNode::GetChildCount
int GetChildCount() const
Definition: ogr_spatialref.h:81
OGRGeomFieldDefn::SetSpatialRef
void SetSpatialRef(OGRSpatialReference *poSRSIn)
Set the spatial reference of this field.
Definition: ogrgeomfielddefn.cpp:486
OGRSpatialReference::GetEPSGGeogCS
int GetEPSGGeogCS()
Definition: ogr_fromepsg.cpp:2507
CPLHashSetHashPointer
unsigned long CPLHashSetHashPointer(const void *elt)
Definition: cpl_hash_set.cpp:514
ogr_spatialref.h
OGRSpatialReference::SetVertCS
OGRErr SetVertCS(const char *pszVertCSName, const char *pszVertDatumName, int nVertDatumClass=2005)
Set the user visible VERT_CS name.
Definition: ogrspatialreference.cpp:3119
OGRSpatialReference::SetMercator2SP
OGRErr SetMercator2SP(double dfStdP1, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:5102
OAO_North
@ OAO_North
Definition: ogr_srs_api.h:50
CPLGetLastErrorMsg
const char * CPLGetLastErrorMsg(void)
Definition: cpl_error.cpp:788
OGRSpatialReference::SetNode
OGRErr SetNode(const char *, const char *)
Set attribute value in spatial reference.
Definition: ogrspatialreference.cpp:826
OGRSpatialReference::SetGeogCS
OGRErr SetGeogCS(const char *pszGeogName, const char *pszDatumName, const char *pszEllipsoidName, double dfSemiMajor, double dfInvFlattening, const char *pszPMName=NULL, double dfPMOffset=0.0, const char *pszUnits=NULL, double dfConvertToRadians=0.0)
Set geographic coordinate system.
Definition: ogrspatialreference.cpp:1560
OGRFeature::SetFID
virtual OGRErr SetFID(GIntBig nFIDIn)
Set the feature identifier.
Definition: ogrfeature.cpp:5214
OGRFeature::GetFieldAsInteger
int GetFieldAsInteger(int i)
Fetch field value as integer.
Definition: ogrfeature.cpp:1661
OGR_RawField_IsNull
int OGR_RawField_IsNull(const OGRField *)
Returns whether a raw field is null.
Definition: ogrfeature.cpp:6738
cpl_error.h
OGRSpatialReference::SetMercator
OGRErr SetMercator(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:5061
OGRFeature::SetNativeMediaType
void SetNativeMediaType(const char *pszNativeMediaType)
Sets the native media type for the feature.
Definition: ogrfeature.cpp:6665
OGRSpatialReference::Release
void Release()
Decrements the reference count by one, and destroy if zero.
Definition: ogrspatialreference.cpp:378
CPLEscapeString
char * CPLEscapeString(const char *pszString, int nLength, int nScheme)
Definition: cpl_string.cpp:2018
OGRSpatialReference::SetTOWGS84
OGRErr SetTOWGS84(double, double, double, double=0.0, double=0.0, double=0.0, double=0.0)
Set the Bursa-Wolf conversion to WGS84.
Definition: ogrspatialreference.cpp:6771
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:616
OGRSpatialReference::SetTMG
OGRErr SetTMG(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:3927
OGRFeature::GetStyleString
virtual const char * GetStyleString()
Fetch style string for this feature.
Definition: ogrfeature.cpp:5907
CPLString::Printf
CPLString & Printf(const char *pszFormat,...)
Definition: cplstring.cpp:59
OGRSpatialReference::SetEquirectangular
OGRErr SetEquirectangular(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:4306
OGRFeatureDefn::GetGeomFieldCount
virtual int GetGeomFieldCount()
Fetch number of geometry fields on this feature.
Definition: ogrfeaturedefn.cpp:583
OGRSpatialReference::GetAuthorityCode
const char * GetAuthorityCode(const char *pszTargetKey) const
Get the authority code for a node.
Definition: ogrspatialreference.cpp:5905
VSI_REALLOC_VERBOSE
#define VSI_REALLOC_VERBOSE(pOldPtr, nNewSize)
Definition: cpl_vsi.h:274
OGRSpatialReference::SetLCC1SP
OGRErr SetLCC1SP(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:4950
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:324
OGRSpatialReference::GetAttrValue
const char * GetAttrValue(const char *, int=0) const
Fetch indicated attribute of named node.
Definition: ogrspatialreference.cpp:518
CPLCalloc
void * CPLCalloc(size_t, size_t)
Definition: cpl_conv.cpp:128
OGRSpatialReference::SetStatePlane
OGRErr SetStatePlane(int nZone, int bNAD83=TRUE, const char *pszOverrideUnitName=NULL, double dfOverrideUnit=0.0)
Set State Plane projection definition.
Definition: ogr_fromepsg.cpp:2357
OGRSpatialReference::SetExtension
OGRErr SetExtension(const char *pszTargetKey, const char *pszName, const char *pszValue)
Set extension value.
Definition: ogrspatialreference.cpp:7163
OGRFeatureDefn::GetFieldCount
virtual int GetFieldCount()
Fetch number of fields on this feature.
Definition: ogrfeaturedefn.cpp:270
OGRFieldDefn::GetWidth
int GetWidth() const
Get the formatting width for this field.
Definition: ogr_feature.h:97
OGR_G_ForceToMultiLineString
OGRGeometryH OGR_G_ForceToMultiLineString(OGRGeometryH) CPL_WARN_UNUSED_RESULT
Convert to multilinestring.
Definition: ogrgeometryfactory.cpp:1230
OGRSpatialReference
Definition: ogr_spatialref.h:132
OGRSpatialReference::SetACEA
OGRErr SetACEA(double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:3961
OGRLayer::GetFeatureCount
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:166
OGRSpatialReference::EPSGTreatsAsNorthingEasting
int EPSGTreatsAsNorthingEasting()
This method returns TRUE if EPSG feels this projected coordinate system should be treated as having n...
Definition: ogr_fromepsg.cpp:2805
CPLsnprintf
int CPLsnprintf(char *str, size_t size, const char *fmt,...)
Definition: cpl_string.cpp:1333
OSRAutoIdentifyEPSG
OGRErr OSRAutoIdentifyEPSG(OGRSpatialReferenceH hSRS)
Set EPSG authority info if possible.
Definition: ogr_fromepsg.cpp:2713
OFTDateTime
@ OFTDateTime
Definition: ogr_core.h:597
OGRGeometry
Definition: ogr_geometry.h:118
OGRSpatialReference::SetLinearUnits
OGRErr SetLinearUnits(const char *pszName, double dfInMeters)
Set the linear units for the projection.
Definition: ogrspatialreference.cpp:1185
OGRFeature::GetGeomFieldDefnRef
OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField)
Fetch definition for this geometry field.
Definition: ogr_feature.h:312
OGRLayer
Definition: ogrsf_frmts.h:68
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:338
OGRSpatialReference::SetPS
OGRErr SetPS(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:5320
OGRSpatialReference::IsProjected
int IsProjected() const
Check if projected coordinate system.
Definition: ogrspatialreference.cpp:6176
OGR_SRSNode::SetValue
void SetValue(const char *)
Definition: ogr_srsnode.cpp:358
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:100
OGRLayer::GetSpatialFilter
virtual OGRGeometry * GetSpatialFilter()
This method returns the current spatial filter for this layer.
Definition: ogrlayer.cpp:1079
OGRFeature::SetNativeData
void SetNativeData(const char *pszNativeData)
Sets the native data for the feature.
Definition: ogrfeature.cpp:6609
OAO_East
@ OAO_East
Definition: ogr_srs_api.h:52
CPLRealloc
void * CPLRealloc(void *, size_t)
Definition: cpl_conv.cpp:215
OGRLayer::SetSpatialFilter
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrlayer.cpp:1106
OGRSpatialReference::SetPolyconic
OGRErr SetPolyconic(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:5283
OGRSpatialReference::SetLCCB
OGRErr SetLCCB(double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:4988
OLCFastFeatureCount
#define OLCFastFeatureCount
Definition: ogr_core.h:726
CPL_FRMT_GIB
#define CPL_FRMT_GIB
Definition: cpl_port.h:326
EQUAL
#define EQUAL(a, b)
Definition: cpl_port.h:622
OGRSpatialReference::FixupOrdering
OGRErr FixupOrdering()
Correct parameter ordering to match CT Specification.
Definition: ogrspatialreference.cpp:6998
OGR_SRSNode::GetValue
const char * GetValue() const
Definition: ogr_spatialref.h:95
OGRSpatialReference::SetTargetLinearUnits
OGRErr SetTargetLinearUnits(const char *pszTargetKey, const char *pszName, double dfInMeters)
Set the linear units for the projection.
Definition: ogrspatialreference.cpp:1239
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:317
SRS_PT_LABORDE_OBLIQUE_MERCATOR
#define SRS_PT_LABORDE_OBLIQUE_MERCATOR
Definition: ogr_srs_api.h:152
CSLGetField
const char * CSLGetField(char **, int)
Definition: cpl_string.cpp:173
wkbFlatten
#define wkbFlatten(x)
Definition: ogr_core.h:431
OGRSpatialReference::GetAuthorityName
const char * GetAuthorityName(const char *pszTargetKey) const
Get the authority name for a node.
Definition: ogrspatialreference.cpp:5977
OGR_RawField_IsUnset
int OGR_RawField_IsUnset(const OGRField *)
Returns whether a raw field is unset.
Definition: ogrfeature.cpp:6717
CSLDuplicate
char ** CSLDuplicate(char **papszStrList)
Definition: cpl_string.cpp:228
CPLAssert
#define CPLAssert(expr)
Definition: cpl_error.h:182
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:3208
OGRERR_UNSUPPORTED_SRS
#define OGRERR_UNSUPPORTED_SRS
Definition: ogr_core.h:294
OGRSpatialReference::SetHOMAC
OGRErr SetHOMAC(double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfRectToSkew, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Set an Hotine Oblique Mercator Azimuth Center projection using azimuth angle.
Definition: ogrspatialreference.cpp:4608
SRS_PP_SCALE_FACTOR
#define SRS_PP_SCALE_FACTOR
Definition: ogr_srs_api.h:271
CPLES_SQL
#define CPLES_SQL
Definition: cpl_string.h:204
OGRSpatialReference::GetPrimeMeridian
double GetPrimeMeridian(char **=NULL) const
Fetch prime meridian info.
Definition: ogrspatialreference.cpp:1476
OGRSpatialReferenceH
void * OGRSpatialReferenceH
Definition: ogr_api.h:69
OGRSpatialReference::GetProjParm
double GetProjParm(const char *, double=0.0, OGRErr *=NULL) const
Fetch a projection parameter value.
Definition: ogrspatialreference.cpp:3579
OGRFeature::GetFieldDefnRef
OGRFieldDefn * GetFieldDefnRef(int iField) const
Fetch definition for this field.
Definition: ogr_feature.h:328
OGRLayer::GetFeature
virtual OGRFeature * GetFeature(GIntBig nFID) CPL_WARN_UNUSED_RESULT
Fetch a feature by its identifier.
Definition: ogrlayer.cpp:445
OGRSpatialReference::SetKrovak
OGRErr SetKrovak(double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfPseudoStdParallelLat, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:4832
OGRField
Definition: ogr_core.h:661
OGRFeatureDefn::GetGeomFieldDefn
virtual OGRGeomFieldDefn * GetGeomFieldDefn(int i)
Fetch geometry field definition.
Definition: ogrfeaturedefn.cpp:632
OGRSpatialReference::EPSGTreatsAsLatLong
int EPSGTreatsAsLatLong()
This method returns TRUE if EPSG feels this geographic coordinate system should be treated as having ...
Definition: ogr_fromepsg.cpp:2742
CSLCount
int CSLCount(const char *const *papszStrList)
Definition: cpl_string.cpp:147
GUIntBig
unsigned long long GUIntBig
Definition: cpl_port.h:253
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:285
CPLE_OpenFailed
#define CPLE_OpenFailed
Definition: cpl_error.h:106
OGRFeature::GetFieldAsInteger64
GIntBig GetFieldAsInteger64(int i)
Fetch field value as integer 64 bit.
Definition: ogrfeature.cpp:1800
VALIDATE_POINTER1
#define VALIDATE_POINTER1(ptr, func, rc)
Definition: cpl_error.h:208
OGRSpatialReference::GetUTMZone
int GetUTMZone(int *pbNorth=NULL) const
Get utm zone information.
Definition: ogrspatialreference.cpp:5631
OGRERR_FAILURE
#define OGRERR_FAILURE
Definition: ogr_core.h:293
OGR_SRSNode::GetChild
OGR_SRSNode * GetChild(int)
Definition: ogr_srsnode.cpp:122
OFTString
@ OFTString
Definition: ogr_core.h:590
OAO_Other
@ OAO_Other
Definition: ogr_srs_api.h:49
OGRSpatialReference::importFromDict
OGRErr importFromDict(const char *pszDict, const char *pszCode)
Definition: ogr_srs_dict.cpp:69
OGRSpatialReference::SetTMSO
OGRErr SetTMSO(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:3849
ogrsf_frmts.h
OGRSpatialReference::Clear
void Clear()
Wipe current definition.
Definition: ogrspatialreference.cpp:239
OGRSpatialReference::SetGeocCS
OGRErr SetGeocCS(const char *pszGeocName)
Set the user visible GEOCCS name.
Definition: ogrspatialreference.cpp:3036
CPLDebug
void CPLDebug(const char *, const char *,...)
Definition: cpl_error.cpp:492
OGRLayer::GetExtent
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE) CPL_WARN_UNUSED_RESULT
Fetch the extent of this layer.
Definition: ogrlayer.cpp:207
OGRFieldDefn
Definition: ogr_feature.h:62
ogr_srs_api.h
OGRFeature::SetStyleString
virtual void SetStyleString(const char *)
Set feature style string.
Definition: ogrfeature.cpp:5959
OFTInteger
@ OFTInteger
Definition: ogr_core.h:586
OLMD_FID64
#define OLMD_FID64
Definition: ogr_core.h:761
CPLMalloc
void * CPLMalloc(size_t)
Definition: cpl_conv.cpp:158
SRS_PT_POLAR_STEREOGRAPHIC
#define SRS_PT_POLAR_STEREOGRAPHIC
Definition: ogr_srs_api.h:186
cpl_conv.h
wkbNone
@ wkbNone
Definition: ogr_core.h:344
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:4059
OGRFeature::GetDefnRef
OGRFeatureDefn * GetDefnRef()
Fetch feature definition.
Definition: ogr_feature.h:303
wkbPolygon
@ wkbPolygon
Definition: ogr_core.h:319
cpl_string.h
OGRSpatialReference::SetHOM
OGRErr SetHOM(double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfRectToSkew, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Set a Hotine Oblique Mercator projection using azimuth angle.
Definition: ogrspatialreference.cpp:4677
OGRSpatialReference::SetAxes
OGRErr SetAxes(const char *pszTargetKey, const char *pszXAxisName, OGRAxisOrientation eXAxisOrientation, const char *pszYAxisName, OGRAxisOrientation eYAxisOrientation)
Set the axes for a coordinate system.
Definition: ogrspatialreference.cpp:7412
OGR_SRSNode::AddChild
void AddChild(OGR_SRSNode *)
Definition: ogr_srsnode.cpp:238
SRS_UL_METER
#define SRS_UL_METER
Definition: ogr_srs_api.h:336
CPLErrorReset
void CPLErrorReset(void)
Definition: cpl_error.cpp:653
CPLSPrintf
const char * CPLSPrintf(const char *fmt,...)
Definition: cpl_string.cpp:975
OGRSpatialReference::SetOS
OGRErr SetOS(double dfOriginLat, double dfCMeridian, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:5211
OFSTNone
@ OFSTNone
Definition: ogr_core.h:614
OGRSpatialReference::importFromEPSG
OGRErr importFromEPSG(int)
Initialize SRS based on EPSG GCS or PCS code.
Definition: ogr_fromepsg.cpp:2126
OGRFeature::IsFieldSetAndNotNull
bool IsFieldSetAndNotNull(int iField)
Test if a field is set and not null.
Definition: ogrfeature.cpp:1464
OSRCalcInvFlattening
double OSRCalcInvFlattening(double dfSemiMajor, double dfSemiMinor)
Compute inverse flattening from semi-major and semi-minor axis.
Definition: ogrspatialreference.cpp:7612
OGRAxisOrientation
OGRAxisOrientation
Definition: ogr_srs_api.h:48
OGRSpatialReference::importFromProj4
OGRErr importFromProj4(const char *)
Import PROJ.4 coordinate string.
Definition: ogr_srs_proj4.cpp:478
OGRGeometryH
void * OGRGeometryH
Definition: ogr_api.h:56
CPLError
void CPLError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...)
Definition: cpl_error.cpp:215
OGRGeomFieldDefn
Definition: ogr_feature.h:141
OGRFieldDefn::GetNameRef
const char * GetNameRef()
Fetch name of this field.
Definition: ogr_feature.h:83
OSREPSGTreatsAsNorthingEasting
int OSREPSGTreatsAsNorthingEasting(OGRSpatialReferenceH hSRS)
This function returns TRUE if EPSG feels this geographic coordinate system should be treated as havin...
Definition: ogr_fromepsg.cpp:2842
OGRSpatialReference::SetLAEA
OGRErr SetLAEA(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:4877
VSIFree
void VSIFree(void *)
Definition: cpl_vsisimple.cpp:817
CPLE_NotSupported
#define CPLE_NotSupported
Definition: cpl_error.h:110
OFTTime
@ OFTTime
Definition: ogr_core.h:596
OGRFieldDefn::GetType
OGRFieldType GetType() const
Fetch type of this field.
Definition: ogr_feature.h:85
OSREPSGTreatsAsLatLong
int OSREPSGTreatsAsLatLong(OGRSpatialReferenceH hSRS)
This function returns TRUE if EPSG feels this geographic coordinate system should be treated as havin...
Definition: ogr_fromepsg.cpp:2776
OGRGeomFieldDefn::GetNameRef
const char * GetNameRef()
Fetch name of this field.
Definition: ogr_feature.h:162
OGRErr
int OGRErr
Definition: ogr_core.h:285
OGRSpatialReference::SetAuthority
OGRErr SetAuthority(const char *pszTargetKey, const char *pszAuthority, int nCode)
Set the authority for a node.
Definition: ogrspatialreference.cpp:5822
_CPLHashSet
Definition: cpl_hash_set.cpp:40
CSLDestroy
void CSLDestroy(char **papszStrList)
Definition: cpl_string.cpp:200
M_PI
#define M_PI
Definition: cpl_port.h:470
GIntBig
long long GIntBig
Definition: cpl_port.h:250
OSRImportFromEPSGA
OGRErr CPL_STDCALL OSRImportFromEPSGA(OGRSpatialReferenceH, int)
Initialize SRS based on EPSG GCS or PCS code.
Definition: ogr_fromepsg.cpp:2318
VSI_MALLOC_VERBOSE
#define VSI_MALLOC_VERBOSE(size)
Definition: cpl_vsi.h:254
OGRwkbGeometryType
OGRwkbGeometryType
Definition: ogr_core.h:312
SRS_PP_FALSE_EASTING
#define SRS_PP_FALSE_EASTING
Definition: ogr_srs_api.h:287
OGRFeature::GetRawFieldRef
OGRField * GetRawFieldRef(int i)
Fetch a pointer to the internal field value given the index.
Definition: ogr_feature.h:343
OLCRandomRead
#define OLCRandomRead
Definition: ogr_core.h:722
OFTDate
@ OFTDate
Definition: ogr_core.h:595
OGRFeature
Definition: ogr_feature.h:279
OGRSpatialReference::SetLCC
OGRErr SetLCC(double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:4911
OSRAxisEnumToName
const char * OSRAxisEnumToName(OGRAxisOrientation eOrientation)
Return the string representation for the OGRAxisOrientation enumeration.
Definition: ogrspatialreference.cpp:7369
cpl_port.h
OGRGeomFieldDefn::GetType
OGRwkbGeometryType GetType() const
Fetch geometry type of this field.
Definition: ogr_feature.h:164
OGRFeature::GetNativeMediaType
const char * GetNativeMediaType() const
Returns the native media type for the feature.
Definition: ogr_feature.h:468
ogr_api.h
OGRFeature::SetGeomField
OGRErr SetGeomField(int iField, const OGRGeometry *)
Set feature geometry of a specified geometry field.
Definition: ogrfeature.cpp:805
OLCFastGetExtent
#define OLCFastGetExtent
Definition: ogr_core.h:727
OGR_SRSNode::FindChild
int FindChild(const char *) const
Definition: ogr_srsnode.cpp:322
SRS_UL_US_FOOT_CONV
#define SRS_UL_US_FOOT_CONV
Definition: ogr_srs_api.h:344
wkbGeometryCollection
@ wkbGeometryCollection
Definition: ogr_core.h:325
OGRFieldType
OGRFieldType
Definition: ogr_core.h:584
OGR_G_ForceToMultiPolygon
OGRGeometryH OGR_G_ForceToMultiPolygon(OGRGeometryH) CPL_WARN_UNUSED_RESULT
Convert to multipolygon.
Definition: ogrgeometryfactory.cpp:875
OGRLayer::SetNextByIndex
virtual OGRErr SetNextByIndex(GIntBig nIndex)
Move read cursor to the nIndex'th feature in the current resultset.
Definition: ogrlayer.cpp:497
OGRFeature::GetFieldAsDouble
double GetFieldAsDouble(int i)
Fetch field value as a double.
Definition: ogrfeature.cpp:1918
OGRSpatialReference::GetAttrNode
OGR_SRSNode * GetAttrNode(const char *)
Find named node in tree.
Definition: ogrspatialreference.cpp:447
OGRLayer::SetIgnoredFields
virtual OGRErr SetIgnoredFields(const char **papszFields)
Set which fields can be omitted when retrieving features from the layer.
Definition: ogrlayer.cpp:1780
OGR_SRSNode::Clone
OGR_SRSNode * Clone() const
Definition: ogr_srsnode.cpp:375
CSLAddString
char ** CSLAddString(char **papszStrList, const char *pszNewString)
Definition: cpl_string.cpp:83
OGRSpatialReference::SetCS
OGRErr SetCS(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:4104
OFTInteger64
@ OFTInteger64
Definition: ogr_core.h:598
OGRSpatialReference::GetLinearUnits
double GetLinearUnits(char **=NULL) const
Fetch linear projection units.
Definition: ogrspatialreference.cpp:1338
OGRERR_NONE
#define OGRERR_NONE
Definition: ogr_core.h:287
CPLStrdup
char * CPLStrdup(const char *)
Definition: cpl_conv.cpp:284
OGRGeomFieldDefn::GetSpatialRef
virtual OGRSpatialReference * GetSpatialRef()
Fetch spatial reference system of this field.
Definition: ogrgeomfielddefn.cpp:435
OGRFeatureDefn
Definition: ogr_feature.h:207
CPLAtof
double CPLAtof(const char *)
Definition: cpl_strtod.cpp:117
OGR_SRSNode
Definition: ogr_spatialref.h:60
OGRLayer::SetAttributeFilter
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:337
OLCFastSetNextByIndex
#define OLCFastSetNextByIndex
Definition: ogr_core.h:734
wkbLineString
@ wkbLineString
Definition: ogr_core.h:317
OGRFeature::GetGeomFieldRef
OGRGeometry * GetGeomFieldRef(int iField)
Fetch pointer to feature geometry.
Definition: ogrfeature.cpp:630
OGRSpatialReference::importFromEPSGA
OGRErr importFromEPSGA(int)
Initialize SRS based on EPSG GCS or PCS code.
Definition: ogr_fromepsg.cpp:2191
wkbMultiLineString
@ wkbMultiLineString
Definition: ogr_core.h:323
OSRSetStatePlaneWithUnits
OGRErr OSRSetStatePlaneWithUnits(OGRSpatialReferenceH hSRS, int nZone, int bNAD83, const char *pszOverrideUnitName, double dfOverrideUnit)
Set State Plane projection definition.
Definition: ogr_fromepsg.cpp:2481
OGRSpatialReference::GetNormProjParm
double GetNormProjParm(const char *, double=0.0, OGRErr *=NULL) const
Fetch a normalized projection parameter value.
Definition: ogrspatialreference.cpp:3652
OGRSpatialReference::SetTM
OGRErr SetTM(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:3767
OGRLayer::TestCapability
virtual int TestCapability(const char *)=0
Test if this layer supported the named capability.
OGRFeature::GetFieldAsString
const char * GetFieldAsString(int i)
Fetch field value as a string.
Definition: ogrfeature.cpp:2090
OGRSpatialReference::AutoIdentifyEPSG
OGRErr AutoIdentifyEPSG()
Set EPSG authority info if possible.
Definition: ogr_fromepsg.cpp:2601
SRS_PP_FALSE_NORTHING
#define SRS_PP_FALSE_NORTHING
Definition: ogr_srs_api.h:289
OGRSpatialReference::SetCEA
OGRErr SetCEA(double dfStdP1, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:4070
OFTReal
@ OFTReal
Definition: ogr_core.h:588
OGRSpatialReference::SetLocalCS
OGRErr SetLocalCS(const char *)
Set the user visible LOCAL_CS name.
Definition: ogrspatialreference.cpp:2980
ogr_core.h
OGRFieldDefn::GetSubType
OGRFieldSubType GetSubType() const
Fetch subtype of this field.
Definition: ogr_feature.h:89
OGRSpatialReference::SetNZMG
OGRErr SetNZMG(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:5177
OSRSetStatePlane
OGRErr OSRSetStatePlane(OGRSpatialReferenceH hSRS, int nZone, int bNAD83)
Set State Plane projection definition.
Definition: ogr_fromepsg.cpp:2462
OGRSpatialReference::IsGeographic
int IsGeographic() const
Check if geographic coordinate system.
Definition: ogrspatialreference.cpp:6265
CPLFree
#define CPLFree
Definition: cpl_conv.h:81
wkbUnknown
@ wkbUnknown
Definition: ogr_core.h:314
OSRImportFromEPSG
OGRErr CPL_STDCALL OSRImportFromEPSG(OGRSpatialReferenceH, int)
Initialize SRS based on EPSG GCS or PCS code.
Definition: ogr_fromepsg.cpp:2157
OGRSpatialReference::SetSOC
OGRErr SetSOC(double dfLatitudeOfOrigin, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
Definition: ogrspatialreference.cpp:5469
OGRSpatialReference::SetNormProjParm
OGRErr SetNormProjParm(const char *, double)
Set a projection parameter with a normalized value.
Definition: ogrspatialreference.cpp:3722
OGRFeature::GetNativeData
const char * GetNativeData() const
Returns the native data for the feature.
Definition: ogr_feature.h:467
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:435
OGR_G_ForceToPolygon
OGRGeometryH OGR_G_ForceToPolygon(OGRGeometryH) CPL_WARN_UNUSED_RESULT
Convert to polygon.
Definition: ogrgeometryfactory.cpp:708
OGR_SRSNode::StripNodes
void StripNodes(const char *)
Definition: ogr_srsnode.cpp:864
CPLE_AppDefined
#define CPLE_AppDefined
Definition: cpl_error.h:100
SRS_UL_US_FOOT
#define SRS_UL_US_FOOT
Definition: ogr_srs_api.h:342

Generated for GDAL by doxygen 1.8.17.