|
GDAL
|
Concrete representation of a multi-vertex line. More...
#include <ogr_geometry.h>
Public Member Functions | |
| OGRLineString () | |
| Create an empty line string. | |
| OGRLineString (const OGRLineString &other) | |
| Copy constructor. | |
| OGRLineString & | operator= (const OGRLineString &other) |
| Assignment operator. | |
| virtual OGRLineString * | CurveToLine (double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const CPL_OVERRIDE |
| Return a linestring from a curve geometry. | |
| virtual OGRGeometry * | getCurveGeometry (const char *const *papszOptions=NULL) const CPL_OVERRIDE |
| Return curve version of this geometry. | |
| virtual double | get_Area () const CPL_OVERRIDE |
| Get the area of the (closed) curve. | |
| virtual OGRwkbGeometryType | getGeometryType () const CPL_OVERRIDE |
| Fetch geometry type. | |
| virtual const char * | getGeometryName () const CPL_OVERRIDE |
| Fetch WKT name for geometry type. | |
Static Protected Member Functions | |
| static OGRLinearRing * | CastToLinearRing (OGRLineString *poLS) |
| Cast to linear ring. | |
Concrete representation of a multi-vertex line.
Note: for implementation convenience, we make it inherit from OGRSimpleCurve whereas SFSQL and SQL/MM only make it inherits from OGRCurve.
| OGRLineString::OGRLineString | ( | const OGRLineString & | other | ) |
Copy constructor.
Note: before GDAL 2.1, only the default implementation of the constructor existed, which could be unsafe to use.
| OGRLinearRing * OGRLineString::CastToLinearRing | ( | OGRLineString * | poLS | ) | [static, protected] |
Cast to linear ring.
The passed in geometry is consumed and a new one returned (or NULL in case of failure)
| poLS | the input geometry - ownership is passed to the method. |
| OGRLineString * OGRLineString::CurveToLine | ( | double | dfMaxAngleStepSizeDegrees = 0, |
| const char *const * | papszOptions = NULL |
||
| ) | const [virtual] |
Return a linestring from a curve geometry.
The returned geometry is a new instance whose ownership belongs to the caller.
If the dfMaxAngleStepSizeDegrees is zero, then a default value will be used. This is currently 4 degrees unless the user has overridden the value with the OGR_ARC_STEPSIZE configuration variable.
This method relates to the ISO SQL/MM Part 3 ICurve::CurveToLine() method.
This function is the same as C function OGR_G_CurveToLine().
| dfMaxAngleStepSizeDegrees | the largest step in degrees along the arc, zero to use the default setting. |
| papszOptions | options as a null-terminated list of strings or NULL. See OGRGeometryFactory::curveToLineString() for valid options. |
Implements OGRCurve.
| virtual double OGRLineString::get_Area | ( | ) | const [virtual] |
Get the area of the (closed) curve.
This method is designed to be used by OGRCurvePolygon::get_Area().
Implements OGRCurve.
| OGRGeometry * OGRLineString::getCurveGeometry | ( | const char *const * | papszOptions = NULL | ) | const [virtual] |
Return curve version of this geometry.
Returns a geometry that has possibly CIRCULARSTRING, COMPOUNDCURVE, CURVEPOLYGON, MULTICURVE or MULTISURFACE in it, by de-approximating curve geometries.
If the geometry has no curve portion, the returned geometry will be a clone of it.
The ownership of the returned geometry belongs to the caller.
The reverse method is OGRGeometry::getLinearGeometry().
This function is the same as C function OGR_G_GetCurveGeometry().
| papszOptions | options as a null-terminated list of strings. Unused for now. Must be set to NULL. |
Reimplemented from OGRGeometry.
| const char * OGRLineString::getGeometryName | ( | ) | const [virtual] |
Fetch WKT name for geometry type.
There is no SFCOM analog to this method.
This method is the same as the C function OGR_G_GetGeometryName().
Implements OGRGeometry.
Reimplemented in OGRLinearRing.
| OGRwkbGeometryType OGRLineString::getGeometryType | ( | ) | const [virtual] |
Fetch geometry type.
Note that the geometry type may include the 2.5D flag. To get a 2D flattened version of the geometry type apply the wkbFlatten() macro to the return result.
This method is the same as the C function OGR_G_GetGeometryType().
Implements OGRGeometry.
| OGRLineString & OGRLineString::operator= | ( | const OGRLineString & | other | ) |
Assignment operator.
Note: before GDAL 2.1, only the default implementation of the operator existed, which could be unsafe to use.
1.7.6.1.