30 #ifndef OGREDITABLELAYER_H_INCLUDED
31 #define OGREDITABLELAYER_H_INCLUDED
34 #include "ogrlayerdecorator.h"
37 class CPL_DLL IOGREditableLayerSynchronizer
40 virtual ~IOGREditableLayerSynchronizer();
46 class CPL_DLL OGREditableLayer :
public OGRLayerDecorator
50 IOGREditableLayerSynchronizer *m_poSynchronizer;
51 bool m_bTakeOwnershipSynchronizer;
54 std::set<GIntBig> m_oSetCreated;
55 std::set<GIntBig> m_oSetEdited;
56 std::set<GIntBig> m_oSetDeleted;
57 std::set<GIntBig>::iterator m_oIter;
58 std::set<CPLString> m_oSetDeletedFields;
60 bool m_bStructureModified;
61 bool m_bSupportsCreateGeomField;
62 bool m_bSupportsCurveGeometries;
66 bool bCanStealSrcFeature,
67 bool bHideDeletedFields);
69 int GetSrcGeomFieldIndex(
int iGeomField);
73 OGREditableLayer(
OGRLayer* poDecoratedLayer,
74 bool bTakeOwnershipDecoratedLayer,
75 IOGREditableLayerSynchronizer* poSynchronizer,
76 bool bTakeOwnershipSynchronizer);
77 virtual ~OGREditableLayer();
79 void SetNextFID(
GIntBig nNextFID);
80 void SetSupportsCreateGeomField(
bool SupportsCreateGeomField);
81 void SetSupportsCurveGeometries(
bool bSupportsCurveGeometries);
84 virtual void SetSpatialFilter(
OGRGeometry * )
override;
85 virtual void SetSpatialFilterRect(
double dfMinX,
double dfMinY,
86 double dfMaxX,
double dfMaxY )
override;
87 virtual void SetSpatialFilter(
int iGeomField,
OGRGeometry * )
override;
88 virtual void SetSpatialFilterRect(
int iGeomField,
double dfMinX,
double dfMinY,
89 double dfMaxX,
double dfMaxY )
override;
91 virtual OGRErr SetAttributeFilter(
const char * )
override;
93 virtual void ResetReading()
override;
106 virtual GIntBig GetFeatureCount(
int bForce = TRUE )
override;
107 virtual OGRErr GetExtent(
int iGeomField, OGREnvelope *psExtent,
int bForce = TRUE)
override;
108 virtual OGRErr GetExtent(OGREnvelope *psExtent,
int bForce = TRUE)
override;
110 virtual int TestCapability(
const char * )
override;
113 int bApproxOK = TRUE )
override;
114 virtual OGRErr DeleteField(
int iField )
override;
115 virtual OGRErr ReorderFields(
int* panMap )
override;
116 virtual OGRErr AlterFieldDefn(
int iField,
OGRFieldDefn* poNewFieldDefn,
int nFlags )
override;
119 int bApproxOK = TRUE )
override;
121 virtual OGRErr SyncToDisk()
override;
123 virtual OGRErr StartTransaction()
override;
124 virtual OGRErr CommitTransaction()
override;
125 virtual OGRErr RollbackTransaction()
override;
127 virtual const char *GetGeometryColumn()
override;
131 #endif // OGREDITABLELAYER_H_INCLUDED
#define OLCReorderFields
Definition: ogr_core.h:756
void setPoint(int, OGRPoint *)
Set the location of a vertex in line string.
Definition: ogrlinestring.cpp:526
int GetChildCount() const
Definition: ogr_spatialref.h:86
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrlinestring.cpp:2279
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrcurvepolygon.cpp:622
OGRBoolean Is3D() const
Definition: ogr_geometry.h:362
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:1007
virtual OGRErr addRingDirectly(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:422
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcompoundcurve.cpp:647
static OGRLineString * CastToLineString(OGRCurve *poCurve)
Cast to linestring.
Definition: ogrcurve.cpp:355
OGRErr addCurve(OGRCurve *, double dfToleranceEps=1e-14)
Add a curve to the container.
Definition: ogrcompoundcurve.cpp:527
double getX(int i) const
Get X at vertex.
Definition: ogr_geometry.h:1160
virtual void empty() override
Clear geometry information. This restores the geometry to its initial state after construction,...
Definition: ogrlinestring.cpp:162
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrcompoundcurve.cpp:131
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:709
@ wkbCurvePolygonZM
Definition: ogr_core.h:390
Definition: ogrcurve.cpp:459
char ** CSLTokenizeString2(const char *pszString, const char *pszDelimiter, int nCSLTFlags)
Definition: cpl_string.cpp:836
Definition: ogr_geometry.h:1241
void setNumPoints(int nNewPointCount, int bZeroizeNewContent=TRUE)
Set number of points in geometry.
Definition: ogrlinestring.cpp:434
virtual OGRBoolean Contains(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:4709
#define OLCCreateGeomField
Definition: ogr_core.h:763
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:5436
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcompoundcurve.cpp:629
OGRCircularString()
Create an empty circular string.
Definition: ogrcircularstring.cpp:58
virtual int getNumPoints() const override
Return the number of points of a curve geometry.
Definition: ogrcompoundcurve.cpp:690
void * CPLGetSymbol(const char *, const char *)
Definition: cplgetsymbol.cpp:89
#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:864
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcircularstring.cpp:166
virtual int Transform(int nCount, double *x, double *y, double *z=nullptr) override
Definition: ogrct.cpp:1011
virtual double get_LinearArea() const
Compute area of ring / closed linestring.
Definition: ogrlinestring.cpp:2774
#define VALIDATE_POINTER0(ptr, func)
Definition: cpl_error.h:251
virtual OGRBoolean getNextPoint(OGRPoint *p)=0
Returns the next point followed by the iterator.
Definition: ogr_geometry.h:907
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrcompoundcurve.cpp:151
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrcompoundcurve.cpp:214
virtual void flattenTo2D() override
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
Definition: ogrcurvepolygon.cpp:168
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrcircularstring.cpp:209
Definition: ogr_geometry.h:1579
virtual int getNumPoints() const override
Fetch vertex count.
Definition: ogr_geometry.h:1158
virtual double get_Area() const override
Get the area of the (closed) curve.
Definition: ogrcompoundcurve.cpp:864
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:5523
void SetNativeMediaType(const char *pszNativeMediaType)
Sets the native media type for the feature.
Definition: ogrfeature.cpp:6887
OGRErr importFromWkt(const char **) override
Definition: ogrcompoundcurve.cpp:201
OGRErr importFromWkt(const char **) override
Definition: ogrlinestring.cpp:1719
OGRCurve * toCurve()
Definition: ogr_geometry.h:537
@ wkbPoint
Definition: ogr_core.h:321
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:720
virtual void setMeasured(OGRBoolean bIsMeasured) override
Add or remove the M coordinate dimension.
Definition: ogrcompoundcurve.cpp:407
virtual double get_Area() const override
Get the area of the surface object.
Definition: ogrcurvepolygon.cpp:671
CPLSTRING_DLL CPLString & Printf(const char *pszFormat,...)
Definition: cplstring.cpp:67
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrlinestring.cpp:1621
Iterator begin()
Definition: ogrcurve.cpp:514
void SetName(const char *)
Reset the name of this field.
Definition: ogrfielddefn.cpp:157
ConstIterator end() const
Definition: ogrcurve.cpp:620
@ wkbCurvePolygonZ
Definition: ogr_core.h:354
virtual double get_Length() const override
Returns the length of the curve.
Definition: ogrcircularstring.cpp:227
#define VSI_REALLOC_VERBOSE(pOldPtr, nNewSize)
Definition: cpl_vsi.h:285
OGRSFDriverH OGR_DS_GetDriver(OGRDataSourceH)
Returns the driver that the dataset was opened with.
Definition: ogrdatasource.cpp:333
ConstIterator begin() const
Definition: ogrcurve.cpp:615
Definition: ogr_featurestyle.h:84
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const
Return a polygon from a curve polygon.
Definition: ogrcurvepolygon.cpp:572
virtual void set3D(OGRBoolean bIs3D)
Add or remove the Z coordinate dimension.
Definition: ogrgeometry.cpp:1030
@ wkbCompoundCurveZM
Definition: ogr_core.h:389
int getNumGeometries() const
Fetch number of geometries in container.
Definition: ogrgeometrycollection.cpp:258
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:516
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: ogrlayer.cpp:1036
@ wkbNDR
Definition: ogr_core.h:492
Definition: ogrcompoundcurve.cpp:706
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcurvepolygon.cpp:597
virtual int GetGeomFieldIndex(const char *) const
Find geometry field by name.
Definition: ogrfeaturedefn.cpp:915
Definition: ogr_geometry.h:2091
void CPLPopErrorHandler(void)
Definition: cpl_error.cpp:1223
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrgeometry.cpp:3085
@ 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:145
@ wkbCompoundCurve
Definition: ogr_core.h:335
virtual OGRSpatialReference * GetTargetCS() override
Definition: ogrct.cpp:999
OGRGeometry * getGeometryRef(int)
Fetch geometry from container.
Definition: ogrgeometrycollection.cpp:283
OGRCoordinateTransformation * OGRCreateCoordinateTransformation(OGRSpatialReference *poSource, OGRSpatialReference *poTarget)
Definition: ogrct.cpp:493
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:172
OGRErr exportToProj4(char **) const
Export coordinate system in PROJ.4 format.
Definition: ogr_srs_proj4.cpp:1482
virtual OGRBoolean getNextPoint(OGRPoint *p) override
Returns the next point followed by the iterator.
Definition: ogrcompoundcurve.cpp:724
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcircularstring.cpp:353
OGRSpatialReference * Clone() const
Make a duplicate of this OGRSpatialReference.
Definition: ogrspatialreference.cpp:590
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:599
virtual double get_Area() const override
Get the area of the (closed) curve.
Definition: ogrcircularstring.cpp:867
@ wkbVariantPostGIS1
Definition: ogr_core.h:427
virtual OGRBoolean IsValid() const override
Test if the geometry is valid.
Definition: ogrcircularstring.cpp:707
virtual OGRBoolean Intersects(const OGRGeometry *) const override
Do these features intersect?
Definition: ogrcurvepolygon.cpp:802
#define OLCSequentialWrite
Definition: ogr_core.h:749
virtual OGRBoolean IsConvex() const
Returns if a (closed) curve forms a convex shape.
Definition: ogrcurve.cpp:278
Definition: ogr_geometry.h:286
virtual OGRBoolean IsValid() const
Test if the geometry is valid.
Definition: ogrgeometry.cpp:2052
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:512
@ wkbCircularString
Definition: ogr_core.h:333
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrlinestring.cpp:2494
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:252
static OGRSpatialReference * FromHandle(OGRSpatialReferenceH hSRS)
Definition: ogr_spatialref.h:652
Definition: ogrsf_frmts.h:70
Convenient string class based on std::string.
Definition: cpl_string.h:336
Definition: ogr_geometry.h:809
static void destroy(OGRPointIterator *)
Destroys a point iterator.
Definition: ogrcurve.cpp:450
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:500
double getY(int i) const
Get Y at vertex.
Definition: ogr_geometry.h:1161
virtual const char * GetGeometryColumn()
This method returns the name of the underlying database column being used as the geometry column,...
Definition: ogrlayer.cpp:1623
virtual OGRGeometry * GetSpatialFilter()
This method returns the current spatial filter for this layer.
Definition: ogrlayer.cpp:1084
virtual void empty() override
Clear geometry information. This restores the geometry to its initial state after construction,...
Definition: ogrcurvepolygon.cpp:131
void SetNativeData(const char *pszNativeData)
Sets the native data for the feature.
Definition: ogrfeature.cpp:6831
OGRGeometry & operator=(const OGRGeometry &other)
Assignment operator.
Definition: ogrgeometry.cpp:142
void * CPLRealloc(void *, size_t)
Definition: cpl_conv.cpp:225
const char * GetNameRef() const
Fetch name of this field.
Definition: ogr_feature.h:203
Definition: ogrct.cpp:151
@ wkbCircularStringZM
Definition: ogr_core.h:388
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcompoundcurve.cpp:105
virtual void EndPoint(OGRPoint *) const override
Return the curve end point.
Definition: ogrcompoundcurve.cpp:303
#define EQUAL(a, b)
Definition: cpl_port.h:559
OGRErr OGR_DS_SyncToDisk(OGRDataSourceH)
Definition: ogrdatasource.cpp:317
void * OGRStyleTableH
Definition: ogr_api.h:303
#define wkbHasZ(x)
Definition: ogr_core.h:446
virtual void SetEmitErrors(bool bEmitErrors) override
Definition: ogrct.cpp:214
OGRErr SetFieldsFrom(const OGRFeature *, const int *, int=TRUE)
Set fields from another feature.
Definition: ogrfeature.cpp:5959
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:718
const char * GetValue() const
Definition: ogr_spatialref.h:100
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
void setX(double xIn)
Assign point X coordinate.
Definition: ogr_geometry.h:865
virtual OGRErr StartTransaction() CPL_WARN_UNUSED_RESULT
For datasources which support transactions, StartTransaction creates a transaction.
Definition: ogrlayer.cpp:911
#define VSI_MALLOC2_VERBOSE(nSize1, nSize2)
Definition: cpl_vsi.h:270
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcompoundcurve.cpp:270
#define OLCCurveGeometries
Definition: ogr_core.h:764
#define wkbFlatten(x)
Definition: ogr_core.h:440
void OGR_DS_ReleaseResultSet(OGRDataSourceH, OGRLayerH)
Release results of OGR_DS_ExecuteSQL().
Definition: ogrdatasource.cpp:238
void CPLPushErrorHandler(CPLErrorHandler)
Definition: cpl_error.cpp:1166
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:4831
#define OLCAlterFieldDefn
Definition: ogr_core.h:757
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:182
virtual void Value(double, OGRPoint *) const override
Fetch point at given distance along curve.
Definition: ogrcompoundcurve.cpp:313
Definition: ogr_geometry.h:63
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:542
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:382
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:965
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrcurvepolygon.cpp:443
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcompoundcurve.cpp:665
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcompoundcurve.cpp:402
virtual OGRSpatialReference * GetSpatialRef() const
Fetch spatial reference system of this field.
Definition: ogrgeomfielddefn.cpp:435
int CPL_STDCALL OCTTransformEx(OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z, int *pabSuccess)
Definition: ogrct.cpp:1428
Definition: ogr_geometry.h:1724
bool CPLTestBool(const char *pszValue)
Definition: cpl_string.cpp:1526
OGRSimpleCurve & operator=(const OGRSimpleCurve &other)
Assignment operator.
Definition: ogrlinestring.cpp:113
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:489
void * OGRCoordinateTransformationH
Definition: ogr_api.h:76
void CPL_STDCALL OCTDestroyCoordinateTransformation(OGRCoordinateTransformationH)
OGRCoordinateTransformation destructor.
Definition: ogrct.cpp:438
virtual OGRGeomFieldDefn * GetGeomFieldDefn(int i)
Fetch geometry field definition.
Definition: ogrfeaturedefn.cpp:680
Definition: ogr_geometry.h:1394
OGRCurvePolygon()
Create an empty curve polygon.
Definition: ogrcurvepolygon.cpp:52
#define OLCDeleteFeature
Definition: ogr_core.h:759
static OGRGeometry * createGeometry(OGRwkbGeometryType)
Create an empty geometry of desired type.
Definition: ogrgeometryfactory.cpp:527
virtual int TransformEx(int nCount, double *x, double *y, double *z=nullptr, int *panSuccess=nullptr) override
Definition: ogrct.cpp:1069
@ wkbCurvePolygon
Definition: ogr_core.h:336
virtual const char * GetStyleString() const
Fetch style string for this feature.
Definition: ogrfeature.cpp:6114
virtual OGRBoolean Intersects(const OGRGeometry *) const
Do these features intersect?
Definition: ogrgeometry.cpp:491
int GetFieldIndex(const char *pszName) const
Fetch the field index given field name.
Definition: ogr_feature.h:605
#define CPLE_ObjectNull
Definition: cpl_error.h:117
virtual void StartPoint(OGRPoint *) const override
Return the curve start point.
Definition: ogrlinestring.cpp:1956
OGRErr addCurveDirectly(OGRCurve *, double dfToleranceEps=1e-14)
Add a curve directly to the container.
Definition: ogrcompoundcurve.cpp:558
static OGRLayerH ToHandle(OGRLayer *poLayer)
Definition: ogrsf_frmts.h:252
OGRPoint * toPoint()
Definition: ogr_geometry.h:523
#define VALIDATE_POINTER1(ptr, func, rc)
Definition: cpl_error.h:260
virtual OGRErr CommitTransaction() CPL_WARN_UNUSED_RESULT
For datasources which support transactions, CommitTransaction commits a transaction.
Definition: ogrlayer.cpp:938
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcurvepolygon.cpp:697
#define OGRERR_FAILURE
Definition: ogr_core.h:298
OGR_SRSNode * GetChild(int)
Definition: ogr_srsnode.cpp:122
@ wkbCircularStringM
Definition: ogr_core.h:370
virtual double get_Length() const override
Returns the length of the curve.
Definition: ogrcompoundcurve.cpp:281
#define OGRERR_NOT_ENOUGH_MEMORY
Definition: ogr_core.h:294
virtual OGRGeometry * clone() const override
Make a copy of this object.
Definition: ogrcompoundcurve.cpp:225
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrlinestring.cpp:1505
@ wkbCurvePolygonM
Definition: ogr_core.h:372
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurvepolygon.cpp:661
int Dereference()
Decrements the reference count by one.
Definition: ogrspatialreference.cpp:348
Iterator end()
Definition: ogrcurve.cpp:519
void CPLDebug(const char *, const char *,...)
Definition: cpl_error.cpp:544
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a linestring from a curve geometry.
Definition: ogrlinestring.cpp:2752
virtual int ContainsPoint(const OGRPoint *p) const
Returns if a point is contained in a (closed) curve.
Definition: ogrcurve.cpp:398
virtual void setCoordinateDimension(int nDimension) override
Set the coordinate dimension.
Definition: ogrcurvepolygon.cpp:691
void * OGRDataSourceH
Definition: ogr_api.h:510
Definition: ogr_feature.h:92
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrcurve.cpp:74
virtual void SetStyleString(const char *)
Set feature style string.
Definition: ogrfeature.cpp:6166
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrcurvepolygon.cpp:467
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:6499
void addSubLineString(const OGRLineString *, int nStartVertex=0, int nEndVertex=-1)
Add a segment of another linestring to this one.
Definition: ogrlinestring.cpp:1416
void addPoint(const OGRPoint *)
Add a point to a line string.
Definition: ogrlinestring.cpp:783
virtual void assignSpatialReference(OGRSpatialReference *poSR)
Assign spatial reference to this object.
Definition: ogrgeometry.cpp:421
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcurvepolygon.cpp:141
OGRSimpleCurve * toSimpleCurve()
Definition: ogr_geometry.h:1001
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcircularstring.cpp:127
@ wkbNone
Definition: ogr_core.h:349
static OGRPolygon * CastToPolygon(OGRCurvePolygon *poCP)
Convert to polygon.
Definition: ogrcurvepolygon.cpp:833
OGRSpatialReference * getSpatialReference(void) const
Returns spatial reference system for object.
Definition: ogr_geometry.h:434
OGRLineString * toLineString()
Definition: ogr_geometry.h:565
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:324
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:106
#define OLCRandomWrite
Definition: ogr_core.h:750
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcompoundcurve.cpp:177
#define VSI_CALLOC_VERBOSE(nCount, nSize)
Definition: cpl_vsi.h:280
void CPLErrorReset(void)
Definition: cpl_error.cpp:710
@ wkbCompoundCurveM
Definition: ogr_core.h:371
OGRLayerH OGR_DS_GetLayer(OGRDataSourceH, int)
Fetch a layer by index.
Definition: ogrdatasource.cpp:285
Definition: ogrsf_frmts.h:315
Definition: ogr_geometry.h:1034
OGRErr importFromWkt(const char **) override
Definition: ogrcircularstring.cpp:189
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrcompoundcurve.cpp:656
virtual void SetSpatialFilterRect(double dfMinX, double dfMinY, double dfMaxX, double dfMaxY)
Set a new rectangular spatial filter.
Definition: ogrlayer.cpp:1183
void * OGRGeometryH
Definition: ogr_api.h:60
void CPLError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...)
Definition: cpl_error.cpp:232
Definition: ogr_feature.h:182
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrlinestring.cpp:1838
int getNumCurves() const
Return the number of curves.
Definition: ogrcompoundcurve.cpp:435
static OGRLayer * FromHandle(OGRLayerH hLayer)
Definition: ogrsf_frmts.h:258
void VSIFree(void *)
Definition: cpl_vsisimple.cpp:823
OGRCurve * getCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcompoundcurve.cpp:459
#define CPLE_NotSupported
Definition: cpl_error.h:109
#define OGRERR_NOT_ENOUGH_DATA
Definition: ogr_core.h:293
#define OGRERR_CORRUPT_DATA
Definition: ogr_core.h:297
#define OLCCreateField
Definition: ogr_core.h:754
virtual void StartPoint(OGRPoint *) const override
Return the curve start point.
Definition: ogrcompoundcurve.cpp:293
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:140
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:8077
double getZ(int i) const
Get Z at vertex.
Definition: ogrlinestring.cpp:380
virtual int get_IsClosed() const
Return TRUE if curve is closed.
Definition: ogrcurve.cpp:97
void OGR_DS_SetStyleTableDirectly(OGRDataSourceH, OGRStyleTableH)
Definition: ogrdatasource.cpp:359
OGRLinearRing * toLinearRing()
Definition: ogr_geometry.h:579
int OGRErr
Definition: ogr_core.h:290
@ wkbCompoundCurveZ
Definition: ogr_core.h:353
OGRCurvePolygon * toCurvePolygon()
Definition: ogr_geometry.h:663
virtual bool GetEmitErrors() override
Definition: ogrct.cpp:213
virtual void segmentize(double dfMaxLength)
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrgeometry.cpp:789
void CSLDestroy(char **papszStrList)
Definition: cpl_string.cpp:200
#define M_PI
Definition: cpl_port.h:407
long long GIntBig
Definition: cpl_port.h:246
int CPL_STDCALL OCTTransform(OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z)
Definition: ogrct.cpp:1046
const OGRFieldDefn * GetFieldDefnRef(int iField) const
Fetch definition for this field.
Definition: ogr_feature.h:601
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:680
OGRGeometryCollection * toGeometryCollection()
Definition: ogr_geometry.h:677
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:204
int getNumInteriorRings() const
Fetch the number of internal rings.
Definition: ogrcurvepolygon.cpp:241
#define OLCTransactions
Definition: ogr_core.h:758
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:4571
#define VSI_MALLOC_VERBOSE(size)
Definition: cpl_vsi.h:265
virtual void empty() override
Clear geometry information. This restores the geometry to its initial state after construction,...
Definition: ogrcompoundcurve.cpp:243
virtual void EndPoint(OGRPoint *) const override
Return the curve end point.
Definition: ogrlinestring.cpp:1966
OGRwkbGeometryType
Definition: ogr_core.h:317
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:642
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:938
#define OLCDeleteField
Definition: ogr_core.h:755
OGRStyleTableH OGR_DS_GetStyleTable(OGRDataSourceH)
Definition: ogrdatasource.cpp:346
OGRCircularString & operator=(const OGRCircularString &other)
Assignment operator.
Definition: ogrcircularstring.cpp:97
Definition: ogr_feature.h:353
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcurvepolygon.cpp:178
void setY(double yIn)
Assign point Y coordinate.
Definition: ogr_geometry.h:869
virtual void flattenTo2D() override
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
Definition: ogrcompoundcurve.cpp:638
OGRErr removeRing(int iIndex, bool bDelete=true)
Remove a geometry from the container.
Definition: ogrcurvepolygon.cpp:342
const char * GetNativeMediaType() const
Returns the native media type for the feature.
Definition: ogr_feature.h:745
virtual double get_AreaOfCurveSegments() const override
Definition: ogrcompoundcurve.cpp:904
OGRErr SetGeomField(int iField, const OGRGeometry *)
Set feature geometry of a specified geometry field.
Definition: ogrfeature.cpp:880
Definition: ogrcurve.cpp:577
double getZ() const
Fetch Z coordinate.
Definition: ogr_geometry.h:856
void setZ(double zIn)
Assign point Z coordinate. Calling this method will force the geometry coordinate dimension to 3D (wk...
Definition: ogr_geometry.h:873
OGRCoordinateTransformationH CPL_STDCALL OCTNewCoordinateTransformation(OGRSpatialReferenceH hSourceSRS, OGRSpatialReferenceH hTargetSRS)
Definition: ogrct.cpp:542
virtual OGRErr addRing(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:365
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:416
virtual OGRPointIterator * getPointIterator() const override
Returns a point iterator over the curve.
Definition: ogrcompoundcurve.cpp:748
OGRBoolean IsMeasured() const
Definition: ogr_geometry.h:364
OGRCurvePolygon & operator=(const OGRCurvePolygon &other)
Assignment operator.
Definition: ogrcurvepolygon.cpp:91
virtual void setCoordinateDimension(int nDimension) override
Set the coordinate dimension.
Definition: ogrcompoundcurve.cpp:397
Definition: ogr_geometry.h:925
virtual void assignSpatialReference(OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrcurvepolygon.cpp:711
double getY() const
Fetch Y coordinate.
Definition: ogr_geometry.h:854
OGRCompoundCurve()
Create an empty compound curve.
Definition: ogrcompoundcurve.cpp:51
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:729
@ wkbGeometryCollection
Definition: ogr_core.h:330
virtual int GetGeomFieldCount() const
Fetch number of geometry fields on this feature.
Definition: ogrfeaturedefn.cpp:631
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcircularstring.cpp:110
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:728
virtual OGRBoolean Contains(const OGRGeometry *) const override
Test for containment.
Definition: ogrcurvepolygon.cpp:786
virtual OGRErr SetNextByIndex(GIntBig nIndex)
Move read cursor to the nIndex'th feature in the current resultset.
Definition: ogrlayer.cpp:498
virtual OGRErr transform(OGRCoordinateTransformation *poCT)=0
Apply arbitrary coordinate transformation to geometry.
OGR_SRSNode * GetAttrNode(const char *)
Find named node in tree.
Definition: ogrspatialreference.cpp:465
virtual OGRSpatialReference * GetSourceCS() override
Definition: ogrct.cpp:989
Definition: ogrcurve.cpp:528
void SetWidth(int nWidthIn)
Set the formatting width for this field in characters.
Definition: ogr_feature.h:128
Definition: ogr_geometry.h:1312
#define OGRERR_NONE
Definition: ogr_core.h:292
char * CPLStrdup(const char *)
Definition: cpl_conv.cpp:293
Definition: ogr_feature.h:259
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:567
virtual OGRwkbGeometryType GetGeomType()
Return the layer geometry type.
Definition: ogrlayer.cpp:1754
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrcircularstring.cpp:331
CPLErr CPLGetLastErrorType(void)
Definition: cpl_error.cpp:823
static OGRLinearRing * CastToLinearRing(OGRCurve *poCurve)
Cast to linear ring.
Definition: ogrcurve.cpp:377
#define CPLE_IllegalArg
Definition: cpl_error.h:107
Definition: ogr_spatialref.h:65
OGRErr importFromWkt(const char **) override
Definition: ogrcurvepolygon.cpp:526
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:337
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:702
virtual int IntersectsPoint(const OGRPoint *p) const
Returns if a point intersects a (closed) curve.
Definition: ogrcurve.cpp:418
OGRGeometry * GetGeomFieldRef(int iField)
Fetch pointer to feature geometry.
Definition: ogrfeature.cpp:666
Definition: ogr_geometry.h:1909
@ wkbMultiLineString
Definition: ogr_core.h:328
Definition: ogr_geometry.h:1759
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a linestring from a curve geometry.
Definition: ogrcompoundcurve.cpp:372
OGRCurve * getInteriorRingCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcurvepolygon.cpp:269
void CPLQuietErrorHandler(CPLErr, CPLErrorNum, const char *)
Definition: cpl_error.cpp:948
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a linestring from a curve geometry.
Definition: ogrcircularstring.cpp:664
OGRCompoundCurve & operator=(const OGRCompoundCurve &other)
Assignment operator.
Definition: ogrcompoundcurve.cpp:90
#define OGRERR_NON_EXISTING_FEATURE
Definition: ogr_core.h:301
void * OGRLayerH
Definition: ogr_api.h:508
#define OGRERR_INVALID_HANDLE
Definition: ogr_core.h:300
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrcurvepolygon.cpp:158
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:612
int IsGeographic() const
Check if geographic coordinate system.
Definition: ogrspatialreference.cpp:6542
#define CPLFree
Definition: cpl_conv.h:81
@ wkbUnknown
Definition: ogr_core.h:319
void reversePoints(void)
Reverse point order.
Definition: ogrlinestring.cpp:1378
virtual void setMeasured(OGRBoolean bIsMeasured)
Add or remove the M coordinate dimension.
Definition: ogrgeometry.cpp:1053
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcurvepolygon.cpp:498
const char * GetNativeData() const
Returns the native data for the feature.
Definition: ogr_feature.h:744
OGRwkbVariant
Definition: ogr_core.h:423
GIntBig GetFID() const
Get feature identifier.
Definition: ogr_feature.h:711
OGRCurve * stealExteriorRingCurve()
"Steal" reference to external ring.
Definition: ogrcurvepolygon.cpp:310
OGRCompoundCurve * toCompoundCurve()
Definition: ogr_geometry.h:607
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrcurvepolygon.cpp:743
double getX() const
Fetch X coordinate.
Definition: ogr_geometry.h:852
const char * CPLGetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1690
OGRwkbGeometryType getIsoGeometryType() const
Get the geometry type that conforms with ISO SQL/MM Part3.
Definition: ogrgeometry.cpp:761
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:570
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcompoundcurve.cpp:122
#define CPLE_AppDefined
Definition: cpl_error.h:99
unsigned int GUInt32
Definition: cpl_port.h:205
Generated for GDAL by
1.8.17.