30 #ifndef OGREDITABLELAYER_H_INCLUDED
31 #define OGREDITABLELAYER_H_INCLUDED
34 #include "ogrlayerdecorator.h"
38 class CPL_DLL IOGREditableLayerSynchronizer
41 virtual ~IOGREditableLayerSynchronizer();
47 class CPL_DLL OGREditableLayer :
public OGRLayerDecorator
53 IOGREditableLayerSynchronizer *m_poSynchronizer;
54 bool m_bTakeOwnershipSynchronizer;
57 std::set<GIntBig> m_oSetCreated{};
58 std::set<GIntBig> m_oSetEdited{};
59 std::set<GIntBig> m_oSetDeleted{};
60 std::set<GIntBig>::iterator m_oIter{};
61 std::set<CPLString> m_oSetDeletedFields{};
63 bool m_bStructureModified;
64 bool m_bSupportsCreateGeomField;
65 bool m_bSupportsCurveGeometries;
66 std::map<CPLString, int> m_oMapEditableFDefnFieldNameToIdx{};
70 bool bCanStealSrcFeature,
71 bool bHideDeletedFields);
73 int GetSrcGeomFieldIndex(
int iGeomField);
77 OGREditableLayer(
OGRLayer* poDecoratedLayer,
78 bool bTakeOwnershipDecoratedLayer,
79 IOGREditableLayerSynchronizer* poSynchronizer,
80 bool bTakeOwnershipSynchronizer);
81 virtual ~OGREditableLayer();
83 void SetNextFID(
GIntBig nNextFID);
84 void SetSupportsCreateGeomField(
bool SupportsCreateGeomField);
85 void SetSupportsCurveGeometries(
bool bSupportsCurveGeometries);
88 virtual void SetSpatialFilter(
OGRGeometry * )
override;
89 virtual void SetSpatialFilterRect(
double dfMinX,
double dfMinY,
90 double dfMaxX,
double dfMaxY )
override;
91 virtual void SetSpatialFilter(
int iGeomField,
OGRGeometry * )
override;
92 virtual void SetSpatialFilterRect(
int iGeomField,
double dfMinX,
double dfMinY,
93 double dfMaxX,
double dfMaxY )
override;
95 virtual OGRErr SetAttributeFilter(
const char * )
override;
97 virtual void ResetReading()
override;
110 virtual GIntBig GetFeatureCount(
int bForce = TRUE )
override;
111 virtual OGRErr GetExtent(
int iGeomField, OGREnvelope *psExtent,
int bForce = TRUE)
override;
112 virtual OGRErr GetExtent(OGREnvelope *psExtent,
int bForce = TRUE)
override;
114 virtual int TestCapability(
const char * )
override;
117 int bApproxOK = TRUE )
override;
118 virtual OGRErr DeleteField(
int iField )
override;
119 virtual OGRErr ReorderFields(
int* panMap )
override;
120 virtual OGRErr AlterFieldDefn(
int iField,
OGRFieldDefn* poNewFieldDefn,
int nFlags )
override;
123 int bApproxOK = TRUE )
override;
125 virtual OGRErr SyncToDisk()
override;
127 virtual OGRErr StartTransaction()
override;
128 virtual OGRErr CommitTransaction()
override;
129 virtual OGRErr RollbackTransaction()
override;
131 virtual const char *GetGeometryColumn()
override;
135 #endif // OGREDITABLELAYER_H_INCLUDED
#define OLCReorderFields
Definition: ogr_core.h:760
void SetAxisMappingStrategy(OSRAxisMappingStrategy)
Set the data axis to CRS axis mapping strategy.
Definition: ogrspatialreference.cpp:10635
void setPoint(int, OGRPoint *)
Set the location of a vertex in line string.
Definition: ogrlinestring.cpp:536
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrlinestring.cpp:2311
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrcurvepolygon.cpp:619
OGRBoolean Is3D() const
Definition: ogr_geometry.h:363
virtual OGRBoolean IsEmpty() const =0
Returns TRUE (non-zero) if the object has no points.
void OGR_DS_Destroy(OGRDataSourceH)
Closes opened datasource and releases allocated resources.
Definition: ogrdatasource.cpp:58
virtual void setCoordinateDimension(int nDimension)
Set the coordinate dimension.
Definition: ogrgeometry.cpp:1002
virtual OGRErr addRingDirectly(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:419
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcompoundcurve.cpp:644
OGRCoordinateTransformation * OGRCreateCoordinateTransformation(const OGRSpatialReference *poSource, const OGRSpatialReference *poTarget)
Definition: ogrct.cpp:465
static OGRLineString * CastToLineString(OGRCurve *poCurve)
Cast to linestring.
Definition: ogrcurve.cpp:353
OGRErr addCurve(OGRCurve *, double dfToleranceEps=1e-14)
Add a curve to the container.
Definition: ogrcompoundcurve.cpp:524
double getX(int i) const
Get X at vertex.
Definition: ogr_geometry.h:1161
virtual void empty() override
Clear geometry information. This restores the geometry to its initial state after construction,...
Definition: ogrlinestring.cpp:163
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrcompoundcurve.cpp:128
virtual double get_AreaOfCurveSegments() const =0
Get the area of the purely curve portions of a (closed) curve.
#define CPL_SWAP32(x)
Definition: cpl_port.h:719
Iterator end()
Definition: ogrcurve.cpp:520
@ wkbCurvePolygonZM
Definition: ogr_core.h:390
Definition: ogrcurve.cpp:458
Definition: ogr_geometry.h:1243
@ OAO_North
Definition: ogr_srs_api.h:50
void setNumPoints(int nNewPointCount, int bZeroizeNewContent=TRUE)
Set number of points in geometry.
Definition: ogrlinestring.cpp:435
virtual OGRBoolean Contains(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:4909
#define OLCCreateGeomField
Definition: ogr_core.h:767
const char * OGR_DS_GetName(OGRDataSourceH)
Returns the name of the data source.
Definition: ogrdatasource.cpp:305
int OGR_DS_GetLayerCount(OGRDataSourceH)
Get the number of layers in this data source.
Definition: ogrdatasource.cpp:268
virtual OGRErr SetFID(GIntBig nFIDIn)
Set the feature identifier.
Definition: ogrfeature.cpp:5440
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcompoundcurve.cpp:626
OGRCircularString()
Create an empty circular string.
virtual int getNumPoints() const override
Return the number of points of a curve geometry.
Definition: ogrcompoundcurve.cpp:687
bool GetEmitErrors() const override
Definition: ogrct.cpp:389
#define OGRERR_UNSUPPORTED_GEOMETRY_TYPE
Definition: ogr_core.h:295
OGRGeometry * StealGeometry() CPL_WARN_UNUSED_RESULT
Take away ownership of geometry.
Definition: ogrfeature.cpp:498
virtual int getCoordinateDimension() const
Get the dimension of the coordinates in this object.
Definition: ogrgeometry.cpp:859
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcircularstring.cpp:164
virtual double get_LinearArea() const
Compute area of ring / closed linestring.
Definition: ogrlinestring.cpp:2831
#define VALIDATE_POINTER0(ptr, func)
Definition: cpl_error.h:267
virtual OGRBoolean getNextPoint(OGRPoint *p)=0
Returns the next point followed by the iterator.
Definition: ogr_geometry.h:909
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrcompoundcurve.cpp:148
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrcompoundcurve.cpp:211
virtual void flattenTo2D() override
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
Definition: ogrcurvepolygon.cpp:165
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrcircularstring.cpp:207
Definition: ogr_geometry.h:1582
virtual int getNumPoints() const override
Fetch vertex count.
Definition: ogr_geometry.h:1159
virtual double get_Area() const override
Get the area of the (closed) curve.
Definition: ogrcompoundcurve.cpp:863
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:5735
void SetNativeMediaType(const char *pszNativeMediaType)
Sets the native media type for the feature.
Definition: ogrfeature.cpp:6890
void Release()
Decrements the reference count by one, and destroy if zero.
Definition: ogrspatialreference.cpp:931
OGRCurve * toCurve()
Definition: ogr_geometry.h:538
@ wkbPoint
Definition: ogr_core.h:321
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:717
virtual void setMeasured(OGRBoolean bIsMeasured) override
Add or remove the M coordinate dimension.
Definition: ogrcompoundcurve.cpp:404
virtual double get_Area() const override
Get the area of the surface object.
Definition: ogrcurvepolygon.cpp:668
CPLSTRING_METHOD_DLL CPLString & Printf(const char *pszFormat,...)
Definition: cplstring.cpp:59
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrlinestring.cpp:1653
void SetName(const char *)
Reset the name of this field.
Definition: ogrfielddefn.cpp:157
ConstIterator end() const
Definition: ogrcurve.cpp:623
@ wkbCurvePolygonZ
Definition: ogr_core.h:354
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
const char * GetAuthorityCode(const char *pszTargetKey) const
Get the authority code for a node.
Definition: ogrspatialreference.cpp:7381
virtual double get_Length() const override
Returns the length of the curve.
Definition: ogrcircularstring.cpp:225
#define VSI_REALLOC_VERBOSE(pOldPtr, nNewSize)
Definition: cpl_vsi.h:288
OGRSFDriverH OGR_DS_GetDriver(OGRDataSourceH)
Returns the driver that the dataset was opened with.
Definition: ogrdatasource.cpp:333
ConstIterator begin() const
Definition: ogrcurve.cpp:618
Definition: ogr_featurestyle.h:85
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const
Return a polygon from a curve polygon.
Definition: ogrcurvepolygon.cpp:569
virtual void set3D(OGRBoolean bIs3D)
Add or remove the Z coordinate dimension.
Definition: ogrgeometry.cpp:1025
@ wkbCompoundCurveZM
Definition: ogr_core.h:389
OGRErr SetDataAxisToSRSAxisMapping(const std::vector< int > &mapping)
Set a custom data axis to CRS axis mapping.
Definition: ogrspatialreference.cpp:10709
int getNumGeometries() const
Fetch number of geometries in container.
Definition: ogrgeometrycollection.cpp:251
void * CPLCalloc(size_t, size_t)
Definition: cpl_conv.cpp:138
void SetType(OGRFieldType eTypeIn)
Set the type of this field. This should never be done to an OGRFieldDefn that is already part of an O...
Definition: ogrfielddefn.cpp:277
static OGRGeometry * FromHandle(OGRGeometryH hGeom)
Definition: ogr_geometry.h:517
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: ogrlayer.cpp:1037
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:201
@ wkbNDR
Definition: ogr_core.h:492
Definition: ogrcompoundcurve.cpp:704
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcurvepolygon.cpp:594
virtual int GetGeomFieldIndex(const char *) const
Find geometry field by name.
Definition: ogrfeaturedefn.cpp:916
Definition: ogr_geometry.h:2097
void CPLPopErrorHandler(void)
Definition: cpl_error.cpp:1242
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrgeometry.cpp:3089
@ wkbVariantOldOgc
Definition: ogr_core.h:425
int GetWidth() const
Get the formatting width for this field.
Definition: ogr_feature.h:127
Definition: ogr_spatialref.h:157
@ wkbCompoundCurve
Definition: ogr_core.h:335
OGRGeometry * getGeometryRef(int)
Fetch geometry from container.
Definition: ogrgeometrycollection.cpp:276
OGRCoordinateTransformationH OCTNewCoordinateTransformationEx(OGRSpatialReferenceH hSourceSRS, OGRSpatialReferenceH hTargetSRS, OGRCoordinateTransformationOptionsH hOptions)
Definition: ogrct.cpp:620
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:173
OGRErr exportToProj4(char **) const
Export coordinate system in PROJ format.
Definition: ogrspatialreference.cpp:9752
OGRBoolean getNextPoint(OGRPoint *p) override
Returns the next point followed by the iterator.
Definition: ogrcompoundcurve.cpp:723
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcircularstring.cpp:351
int Initialize(const OGRSpatialReference *poSource, const OGRSpatialReference *poTarget, const OGRCoordinateTransformationOptions &options)
Definition: ogrct.cpp:678
OGRSpatialReference * Clone() const
Make a duplicate of this OGRSpatialReference.
Definition: ogrspatialreference.cpp:1187
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
int GetFieldCount() const
Fetch number of fields on this feature. This will always be the same as the field count for the OGRFe...
Definition: ogr_feature.h:600
virtual double get_Area() const override
Get the area of the (closed) curve.
Definition: ogrcircularstring.cpp:865
@ wkbVariantPostGIS1
Definition: ogr_core.h:427
virtual OGRBoolean IsValid() const override
Test if the geometry is valid.
Definition: ogrcircularstring.cpp:705
virtual OGRBoolean Intersects(const OGRGeometry *) const override
Do these features intersect?
Definition: ogrcurvepolygon.cpp:799
#define OLCSequentialWrite
Definition: ogr_core.h:753
virtual OGRBoolean IsConvex() const
Returns if a (closed) curve forms a convex shape.
Definition: ogrcurve.cpp:276
Definition: ogr_geometry.h:287
int IsSame(const OGRSpatialReference *) const
Do these two spatial references describe the same system ?
Definition: ogrspatialreference.cpp:8157
virtual OGRBoolean IsValid() const
Test if the geometry is valid.
Definition: ogrgeometry.cpp:2047
virtual const char * getGeometryName() const =0
Fetch WKT name for geometry type.
OGRLayerH OGR_DS_ExecuteSQL(OGRDataSourceH, const char *, OGRGeometryH, const char *)
Execute an SQL statement against the data store.
Definition: ogrdatasource.cpp:214
void * OGRSFDriverH
Definition: ogr_api.h:513
@ wkbCircularString
Definition: ogr_core.h:333
int OCTTransform4D(OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z, double *t, int *pabSuccess)
Definition: ogrct.cpp:2061
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrlinestring.cpp:2526
OGRErr OGR_DS_DeleteLayer(OGRDataSourceH, int)
Delete the indicated layer from the datasource.
Definition: ogrdatasource.cpp:175
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrcompoundcurve.cpp:249
static OGRSpatialReference * FromHandle(OGRSpatialReferenceH hSRS)
Definition: ogr_spatialref.h:663
Definition: ogrsf_frmts.h:71
Convenient string class based on std::string.
Definition: cpl_string.h:330
int IsProjected() const
Check if projected coordinate system.
Definition: ogrspatialreference.cpp:7642
Definition: ogr_geometry.h:811
static void destroy(OGRPointIterator *)
Destroys a point iterator.
Definition: ogrcurve.cpp:448
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
OGRCurve * stealCurve(int)
"Steal" reference to curve.
Definition: ogrcompoundcurve.cpp:497
double getY(int i) const
Get Y at vertex.
Definition: ogr_geometry.h:1162
virtual const char * GetGeometryColumn()
This method returns the name of the underlying database column being used as the geometry column,...
Definition: ogrlayer.cpp:1624
virtual OGRGeometry * GetSpatialFilter()
This method returns the current spatial filter for this layer.
Definition: ogrlayer.cpp:1085
virtual void empty() override
Clear geometry information. This restores the geometry to its initial state after construction,...
Definition: ogrcurvepolygon.cpp:128
void SetNativeData(const char *pszNativeData)
Sets the native data for the feature.
Definition: ogrfeature.cpp:6834
@ OAO_East
Definition: ogr_srs_api.h:52
OGRGeometry & operator=(const OGRGeometry &other)
Assignment operator.
Definition: ogrgeometry.cpp:137
void * CPLRealloc(void *, size_t)
Definition: cpl_conv.cpp:225
const char * GetNameRef() const
Fetch name of this field.
Definition: ogr_feature.h:203
@ wkbCircularStringZM
Definition: ogr_core.h:388
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcompoundcurve.cpp:102
virtual void EndPoint(OGRPoint *) const override
Return the curve end point.
Definition: ogrcompoundcurve.cpp:300
#define EQUAL(a, b)
Definition: cpl_port.h:569
OGRErr OGR_DS_SyncToDisk(OGRDataSourceH)
Definition: ogrdatasource.cpp:317
void * OGRStyleTableH
Definition: ogr_api.h:304
#define wkbHasZ(x)
Definition: ogr_core.h:446
OGRErr SetFieldsFrom(const OGRFeature *, const int *, int=TRUE)
Set fields from another feature.
Definition: ogrfeature.cpp:5962
const char * GetNameRef() const
Fetch name of this field.
Definition: ogr_feature.h:113
@ wkbCircularStringZ
Definition: ogr_core.h:352
int OGRBoolean
Definition: ogr_core.h:306
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcircularstring.cpp:716
int OGR_DS_TestCapability(OGRDataSourceH, const char *)
Test if capability is available.
Definition: ogrdatasource.cpp:255
void SetPrecision(int nPrecisionIn)
Set the formatting precision for this field in characters.
Definition: ogr_feature.h:131
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
virtual OGRFieldDefn * GetFieldDefn(int i)
Fetch field definition.
Definition: ogrfeaturedefn.cpp:330
OGRSpatialReference * GetSourceCS() override
Definition: ogrct.cpp:1394
void setX(double xIn)
Assign point X coordinate.
Definition: ogr_geometry.h:866
virtual OGRErr StartTransaction() CPL_WARN_UNUSED_RESULT
For datasources which support transactions, StartTransaction creates a transaction.
Definition: ogrlayer.cpp:912
#define VSI_MALLOC2_VERBOSE(nSize1, nSize2)
Definition: cpl_vsi.h:273
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcompoundcurve.cpp:267
#define OLCCurveGeometries
Definition: ogr_core.h:768
#define wkbFlatten(x)
Definition: ogr_core.h:440
void OGR_DS_ReleaseResultSet(OGRDataSourceH, OGRLayerH)
Release results of OGR_DS_ExecuteSQL().
Definition: ogrdatasource.cpp:238
const char * GetAuthorityName(const char *pszTargetKey) const
Get the authority name for a node.
Definition: ogrspatialreference.cpp:7465
void CPLPushErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:1185
static OGRLineString * curveToLineString(double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2, int bHasZ, double dfMaxAngleStepSizeDegrees, const char *const *papszOptions=nullptr)
Converts an arc circle into an approximate line string.
Definition: ogrgeometryfactory.cpp:4909
#define OLCAlterFieldDefn
Definition: ogr_core.h:761
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const =0
Convert a geometry into well known binary format.
#define CPLAssert(expr)
Definition: cpl_error.h:186
virtual void Value(double, OGRPoint *) const override
Fetch point at given distance along curve.
Definition: ogrcompoundcurve.cpp:310
Definition: ogr_geometry.h:64
virtual OGRGeometry * clone() const CPL_WARN_UNUSED_RESULT=0
Make a copy of this object.
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant eWkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrcurvepolygon.cpp:539
virtual void flattenTo2D()=0
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
virtual void StartPoint(OGRPoint *) const =0
Return the curve start point.
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrcompoundcurve.cpp:379
void * OGRSpatialReferenceH
Definition: ogr_api.h:74
virtual OGRErr RollbackTransaction()
For datasources which support transactions, RollbackTransaction will roll back a datasource to its st...
Definition: ogrlayer.cpp:966
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrcurvepolygon.cpp:440
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcompoundcurve.cpp:662
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcompoundcurve.cpp:399
virtual OGRSpatialReference * GetSpatialRef() const
Fetch spatial reference system of this field.
Definition: ogrgeomfielddefn.cpp:438
int CPL_STDCALL OCTTransformEx(OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z, int *pabSuccess)
Definition: ogrct.cpp:2034
Definition: ogr_geometry.h:1729
bool CPLTestBool(const char *pszValue)
Definition: cpl_string.cpp:1526
OGRSimpleCurve & operator=(const OGRSimpleCurve &other)
Assignment operator.
Definition: ogrlinestring.cpp:114
virtual double get_Area() const override
Get the area of the (closed) curve.
virtual int getNumPoints() const =0
Return the number of points of a curve geometry.
OGRwkbByteOrder
Definition: ogr_core.h:490
void * OGRCoordinateTransformationH
Definition: ogr_api.h:76
void CPL_STDCALL OCTDestroyCoordinateTransformation(OGRCoordinateTransformationH)
OGRCoordinateTransformation destructor.
Definition: ogrct.cpp:407
virtual OGRGeomFieldDefn * GetGeomFieldDefn(int i)
Fetch geometry field definition.
Definition: ogrfeaturedefn.cpp:681
Definition: ogr_geometry.h:1397
#define OLCDeleteFeature
Definition: ogr_core.h:763
@ OAMS_TRADITIONAL_GIS_ORDER
Definition: ogr_srs_api.h:653
static OGRGeometry * createGeometry(OGRwkbGeometryType)
Create an empty geometry of desired type.
Definition: ogrgeometryfactory.cpp:528
@ wkbCurvePolygon
Definition: ogr_core.h:336
virtual const char * GetStyleString() const
Fetch style string for this feature.
Definition: ogrfeature.cpp:6117
virtual OGRBoolean Intersects(const OGRGeometry *) const
Do these features intersect?
Definition: ogrgeometry.cpp:486
#define CPLE_ObjectNull
Definition: cpl_error.h:117
virtual void StartPoint(OGRPoint *) const override
Return the curve start point.
Definition: ogrlinestring.cpp:1988
virtual int GetFieldCount() const
Fetch number of fields on this feature.
Definition: ogrfeaturedefn.cpp:286
OGRErr addCurveDirectly(OGRCurve *, double dfToleranceEps=1e-14)
Add a curve directly to the container.
Definition: ogrcompoundcurve.cpp:555
static OGRLayerH ToHandle(OGRLayer *poLayer)
Definition: ogrsf_frmts.h:254
OGRPoint * toPoint()
Definition: ogr_geometry.h:524
#define VALIDATE_POINTER1(ptr, func, rc)
Definition: cpl_error.h:276
virtual OGRErr CommitTransaction() CPL_WARN_UNUSED_RESULT
For datasources which support transactions, CommitTransaction commits a transaction.
Definition: ogrlayer.cpp:939
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcurvepolygon.cpp:694
#define OGRERR_FAILURE
Definition: ogr_core.h:298
@ wkbCircularStringM
Definition: ogr_core.h:370
virtual double get_Length() const override
Returns the length of the curve.
Definition: ogrcompoundcurve.cpp:278
#define OGRERR_NOT_ENOUGH_MEMORY
Definition: ogr_core.h:294
virtual OGRGeometry * clone() const override
Make a copy of this object.
Definition: ogrcompoundcurve.cpp:222
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrlinestring.cpp:1537
@ wkbCurvePolygonM
Definition: ogr_core.h:372
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurvepolygon.cpp:658
void CPLDebug(const char *, const char *,...)
Definition: cpl_error.cpp:602
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a linestring from a curve geometry.
Definition: ogrlinestring.cpp:2809
virtual int ContainsPoint(const OGRPoint *p) const
Returns if a point is contained in a (closed) curve.
Definition: ogrcurve.cpp:396
virtual void setCoordinateDimension(int nDimension) override
Set the coordinate dimension.
Definition: ogrcurvepolygon.cpp:688
void * OGRDataSourceH
Definition: ogr_api.h:511
Definition: ogr_feature.h:93
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrcurve.cpp:72
virtual void SetStyleString(const char *)
Set feature style string.
Definition: ogrfeature.cpp:6169
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrcurvepolygon.cpp:464
void * CPLMalloc(size_t)
Definition: cpl_conv.cpp:168
@ wkbVariantIso
Definition: ogr_core.h:426
int OGR_GT_IsCurve(OGRwkbGeometryType)
Return if a geometry type is an instance of Curve.
Definition: ogrgeometry.cpp:6711
void addSubLineString(const OGRLineString *, int nStartVertex=0, int nEndVertex=-1)
Add a segment of another linestring to this one.
Definition: ogrlinestring.cpp:1428
void addPoint(const OGRPoint *)
Add a point to a line string.
Definition: ogrlinestring.cpp:793
virtual void assignSpatialReference(OGRSpatialReference *poSR)
Assign spatial reference to this object.
Definition: ogrgeometry.cpp:416
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcurvepolygon.cpp:138
OGRSimpleCurve * toSimpleCurve()
Definition: ogr_geometry.h:1002
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcircularstring.cpp:125
@ wkbNone
Definition: ogr_core.h:349
static OGRPolygon * CastToPolygon(OGRCurvePolygon *poCP)
Convert to polygon.
Definition: ogrcurvepolygon.cpp:830
OGRSpatialReference * getSpatialReference(void) const
Returns spatial reference system for object.
Definition: ogr_geometry.h:435
OGRLineString * toLineString()
Definition: ogr_geometry.h:566
OGRErr SetGeomFieldDirectly(int iField, OGRGeometry *)
Set feature geometry of a specified geometry field.
Definition: ogrfeature.cpp:802
static OGRCompoundCurve * CastToCompoundCurve(OGRCurve *puCurve)
Cast to compound curve.
Definition: ogrcurve.cpp:322
OGRLayerH OGR_DS_CopyLayer(OGRDataSourceH, OGRLayerH, const char *, char **)
Duplicate an existing layer.
Definition: ogrdatasource.cpp:157
virtual void EndPoint(OGRPoint *) const =0
Return the curve end point.
virtual OGRGeometry * clone() const override
Make a copy of this object.
Definition: ogrcurvepolygon.cpp:103
#define OLCRandomWrite
Definition: ogr_core.h:754
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcompoundcurve.cpp:174
#define VSI_CALLOC_VERBOSE(nCount, nSize)
Definition: cpl_vsi.h:283
@ wkbCompoundCurveM
Definition: ogr_core.h:371
void OCTDestroyCoordinateTransformationOptions(OGRCoordinateTransformationOptionsH)
Destroy coordinate transformation options.
Definition: ogrct.cpp:121
int OCTCoordinateTransformationOptionsSetOperation(OGRCoordinateTransformationOptionsH hOptions, const char *pszCO, int bReverseCO)
Sets a coordinate operation.
Definition: ogrct.cpp:266
OGRLayerH OGR_DS_GetLayer(OGRDataSourceH, int)
Fetch a layer by index.
Definition: ogrdatasource.cpp:285
Definition: ogrsf_frmts.h:318
Definition: ogr_geometry.h:1036
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrcompoundcurve.cpp:653
const char * GetAxis(const char *pszTargetKey, int iAxis, OGRAxisOrientation *peOrientation) const
Fetch the orientation of one axis.
Definition: ogrspatialreference.cpp:9021
OGRAxisOrientation
Definition: ogr_srs_api.h:48
virtual void SetSpatialFilterRect(double dfMinX, double dfMinY, double dfMaxX, double dfMaxY)
Set a new rectangular spatial filter.
Definition: ogrlayer.cpp:1184
void * OGRGeometryH
Definition: ogr_api.h:60
void CPLError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...)
Definition: cpl_error.cpp:308
Definition: ogr_feature.h:183
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrlinestring.cpp:1870
int getNumCurves() const
Return the number of curves.
Definition: ogrcompoundcurve.cpp:432
static OGRLayer * FromHandle(OGRLayerH hLayer)
Definition: ogrsf_frmts.h:260
void VSIFree(void *)
Definition: cpl_vsisimple.cpp:827
OGRCurve * getCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcompoundcurve.cpp:456
#define CPLE_NotSupported
Definition: cpl_error.h:109
#define OGRERR_NOT_ENOUGH_DATA
Definition: ogr_core.h:293
Definition: ogrct.cpp:278
#define OGRERR_CORRUPT_DATA
Definition: ogr_core.h:297
#define OLCCreateField
Definition: ogr_core.h:758
virtual void StartPoint(OGRPoint *) const override
Return the curve start point.
Definition: ogrcompoundcurve.cpp:290
virtual OGRPointIterator * getPointIterator() const =0
Returns a point iterator over the curve.
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrcircularstring.cpp:138
OGRFieldType GetType() const
Fetch type of this field.
Definition: ogr_feature.h:115
const char * GetExtension(const char *pszTargetKey, const char *pszName, const char *pszDefault=nullptr) const
Fetch extension value.
Definition: ogrspatialreference.cpp:8834
double getZ(int i) const
Get Z at vertex.
Definition: ogrlinestring.cpp:381
virtual int get_IsClosed() const
Return TRUE if curve is closed.
Definition: ogrcurve.cpp:95
void OGR_DS_SetStyleTableDirectly(OGRDataSourceH, OGRStyleTableH)
Definition: ogrdatasource.cpp:359
OGRLinearRing * toLinearRing()
Definition: ogr_geometry.h:580
Iterator begin()
Definition: ogrcurve.cpp:515
int OGRErr
Definition: ogr_core.h:290
@ wkbCompoundCurveZ
Definition: ogr_core.h:353
OGRCurvePolygon * toCurvePolygon()
Definition: ogr_geometry.h:664
virtual void segmentize(double dfMaxLength)
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrgeometry.cpp:784
#define M_PI
Definition: cpl_port.h:417
long long GIntBig
Definition: cpl_port.h:248
int CPL_STDCALL OCTTransform(OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z)
Definition: ogrct.cpp:1453
const OGRFieldDefn * GetFieldDefnRef(int iField) const
Fetch definition for this field.
Definition: ogr_feature.h:602
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrcompoundcurve.cpp:677
OGRGeometryCollection * toGeometryCollection()
Definition: ogr_geometry.h:678
int getNumInteriorRings() const
Fetch the number of internal rings.
Definition: ogrcurvepolygon.cpp:238
#define OLCTransactions
Definition: ogr_core.h:762
static int GetCurveParmeters(double x0, double y0, double x1, double y1, double x2, double y2, double &R, double &cx, double &cy, double &alpha0, double &alpha1, double &alpha2)
Returns the parameter of an arc circle.
Definition: ogrgeometryfactory.cpp:4649
#define VSI_MALLOC_VERBOSE(size)
Definition: cpl_vsi.h:268
virtual void empty() override
Clear geometry information. This restores the geometry to its initial state after construction,...
Definition: ogrcompoundcurve.cpp:240
virtual void EndPoint(OGRPoint *) const override
Return the curve end point.
Definition: ogrlinestring.cpp:1998
OGRwkbGeometryType
Definition: ogr_core.h:318
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:639
static OGRErr createFromWkb(const void *, OGRSpatialReference *, OGRGeometry **, int=-1, OGRwkbVariant=wkbVariantOldOgc)
Create a geometry object of the appropriate type from its well known binary representation.
Definition: ogrgeometryfactory.cpp:105
#define CPL_UNUSED
Definition: cpl_port.h:948
#define OLCDeleteField
Definition: ogr_core.h:759
OGRStyleTableH OGR_DS_GetStyleTable(OGRDataSourceH)
Definition: ogrdatasource.cpp:346
OGRCircularString & operator=(const OGRCircularString &other)
Assignment operator.
Definition: ogrcircularstring.cpp:95
Definition: ogr_feature.h:355
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcurvepolygon.cpp:175
void setY(double yIn)
Assign point Y coordinate.
Definition: ogr_geometry.h:870
virtual void flattenTo2D() override
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
Definition: ogrcompoundcurve.cpp:635
OGRErr removeRing(int iIndex, bool bDelete=true)
Remove a geometry from the container.
Definition: ogrcurvepolygon.cpp:339
const char * GetNativeMediaType() const
Returns the native media type for the feature.
Definition: ogr_feature.h:746
virtual double get_AreaOfCurveSegments() const override
Definition: ogrcompoundcurve.cpp:903
OGRErr GetTOWGS84(double *padfCoef, int nCoeff=7) const
Fetch TOWGS84 parameters, if available.
Definition: ogrspatialreference.cpp:8692
OGRErr SetGeomField(int iField, const OGRGeometry *)
Set feature geometry of a specified geometry field.
Definition: ogrfeature.cpp:880
Definition: ogrcurve.cpp:580
double getZ() const
Fetch Z coordinate.
Definition: ogr_geometry.h:857
void setZ(double zIn)
Assign point Z coordinate. Calling this method will force the geometry coordinate dimension to 3D (wk...
Definition: ogr_geometry.h:874
OGRCoordinateTransformationH CPL_STDCALL OCTNewCoordinateTransformation(OGRSpatialReferenceH hSourceSRS, OGRSpatialReferenceH hTargetSRS)
Definition: ogrct.cpp:570
virtual OGRErr addRing(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:362
virtual int WkbSize() const =0
Returns size of related binary representation.
virtual void assignSpatialReference(OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrcompoundcurve.cpp:413
virtual OGRPointIterator * getPointIterator() const override
Returns a point iterator over the curve.
Definition: ogrcompoundcurve.cpp:747
OGRBoolean IsMeasured() const
Definition: ogr_geometry.h:365
virtual void setCoordinateDimension(int nDimension) override
Set the coordinate dimension.
Definition: ogrcompoundcurve.cpp:394
Definition: ogr_geometry.h:927
virtual void assignSpatialReference(OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrcurvepolygon.cpp:708
double getY() const
Fetch Y coordinate.
Definition: ogr_geometry.h:855
OGRCompoundCurve()
Create an empty compound curve.
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:726
@ wkbGeometryCollection
Definition: ogr_core.h:330
virtual int GetGeomFieldCount() const
Fetch number of geometry fields on this feature.
Definition: ogrfeaturedefn.cpp:632
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcircularstring.cpp:108
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrcircularstring.cpp:726
virtual OGRBoolean Contains(const OGRGeometry *) const override
Test for containment.
Definition: ogrcurvepolygon.cpp:783
void SetEmitErrors(bool bEmitErrors) override
Definition: ogrct.cpp:390
int Transform(int nCount, double *x, double *y, double *z, double *t, int *panSuccess) override
Definition: ogrct.cpp:1467
virtual OGRErr SetNextByIndex(GIntBig nIndex)
Move read cursor to the nIndex'th feature in the current resultset.
Definition: ogrlayer.cpp:499
virtual OGRErr transform(OGRCoordinateTransformation *poCT)=0
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurve.cpp:530
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
void SetWidth(int nWidthIn)
Set the formatting width for this field in characters.
Definition: ogr_feature.h:128
Definition: ogr_geometry.h:1315
OGRSpatialReference * GetTargetCS() override
Definition: ogrct.cpp:1404
#define OGRERR_NONE
Definition: ogr_core.h:292
char * CPLStrdup(const char *)
Definition: cpl_conv.cpp:293
Definition: ogr_feature.h:260
double CPLAtof(const char *)
Definition: cpl_strtod.cpp:117
virtual void Value(double, OGRPoint *) const override
Fetch point at given distance along curve.
Definition: ogrcircularstring.cpp:565
virtual OGRwkbGeometryType GetGeomType()
Return the layer geometry type.
Definition: ogrlayer.cpp:1755
const std::vector< int > & GetDataAxisToSRSAxisMapping() const
Return the data axis to SRS axis mapping.
Definition: ogrspatialreference.cpp:10672
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrcircularstring.cpp:329
CPLErr CPLGetLastErrorType(void)
Definition: cpl_error.cpp:842
static OGRLinearRing * CastToLinearRing(OGRCurve *poCurve)
Cast to linear ring.
Definition: ogrcurve.cpp:375
#define CPLE_IllegalArg
Definition: cpl_error.h:107
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:338
void OGR_DS_SetStyleTable(OGRDataSourceH, OGRStyleTableH)
Definition: ogrdatasource.cpp:373
@ wkbLineString
Definition: ogr_core.h:322
virtual void setMeasured(OGRBoolean bIsMeasured) override
Add or remove the M coordinate dimension.
Definition: ogrcurvepolygon.cpp:699
virtual int IntersectsPoint(const OGRPoint *p) const
Returns if a point intersects a (closed) curve.
Definition: ogrcurve.cpp:416
OGRGeometry * GetGeomFieldRef(int iField)
Fetch pointer to feature geometry.
Definition: ogrfeature.cpp:666
Definition: ogr_geometry.h:1914
@ wkbMultiLineString
Definition: ogr_core.h:328
Definition: ogr_geometry.h:1764
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a linestring from a curve geometry.
Definition: ogrcompoundcurve.cpp:369
OGRCurve * getInteriorRingCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcurvepolygon.cpp:266
OGRErr exportToWkt(char **) const
Convert this SRS into WKT 1 format.
Definition: ogrspatialreference.cpp:1330
void CPLQuietErrorHandler(CPLErr, CPLErrorNum, const char *)
Definition: cpl_error.cpp:967
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a linestring from a curve geometry.
Definition: ogrcircularstring.cpp:662
#define OGRERR_NON_EXISTING_FEATURE
Definition: ogr_core.h:301
void * OGRLayerH
Definition: ogr_api.h:509
#define OGRERR_INVALID_HANDLE
Definition: ogr_core.h:300
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrcurvepolygon.cpp:155
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrcurvepolygon.cpp:609
int IsGeographic() const
Check if geographic coordinate system.
Definition: ogrspatialreference.cpp:7760
#define CPLFree
Definition: cpl_conv.h:81
@ wkbUnknown
Definition: ogr_core.h:319
void reversePoints(void)
Reverse point order.
Definition: ogrlinestring.cpp:1392
virtual void setMeasured(OGRBoolean bIsMeasured)
Add or remove the M coordinate dimension.
Definition: ogrgeometry.cpp:1048
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcurvepolygon.cpp:495
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Definition: cpl_port.h:997
const char * GetNativeData() const
Returns the native data for the feature.
Definition: ogr_feature.h:745
OGRwkbVariant
Definition: ogr_core.h:424
int OCTCoordinateTransformationOptionsSetAreaOfInterest(OGRCoordinateTransformationOptionsH hOptions, double dfWestLongitudeDeg, double dfSouthLatitudeDeg, double dfEastLongitudeDeg, double dfNorthLatitudeDeg)
Sets an area of interest.
Definition: ogrct.cpp:192
GIntBig GetFID() const
Get feature identifier.
Definition: ogr_feature.h:712
OGRCurve * stealExteriorRingCurve()
"Steal" reference to external ring.
Definition: ogrcurvepolygon.cpp:307
OGRCompoundCurve * toCompoundCurve()
Definition: ogr_geometry.h:608
OGRCoordinateTransformationOptionsH OCTNewCoordinateTransformationOptions(void)
Create coordinate transformation options.
Definition: ogrct.cpp:108
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrcurvepolygon.cpp:740
double getX() const
Fetch X coordinate.
Definition: ogr_geometry.h:853
const char * CPLGetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1692
OGRwkbGeometryType getIsoGeometryType() const
Get the geometry type that conforms with ISO SQL/MM Part3.
Definition: ogrgeometry.cpp:756
OGRLayerH OGR_DS_GetLayerByName(OGRDataSourceH, const char *)
Fetch a layer by name.
Definition: ogrdatasource.cpp:194
virtual double get_Area() const =0
Get the area of the (closed) curve.
OGRLayerH OGR_DS_CreateLayer(OGRDataSourceH, const char *, OGRSpatialReferenceH, OGRwkbGeometryType, char **)
This function attempts to create a new layer on the data source with the indicated name,...
Definition: ogrdatasource.cpp:127
#define STARTS_WITH_CI(a, b)
Definition: cpl_port.h:580
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcompoundcurve.cpp:119
#define CPLE_AppDefined
Definition: cpl_error.h:99
unsigned int GUInt32
Definition: cpl_port.h:207
OGRErr SetFromUserInput(const char *)
Set spatial reference from various text formats.
Definition: ogrspatialreference.cpp:3216
Generated for GDAL by
1.8.20.