Concrete representation of a multivertex line. More...
#include <ogr_geometry.h>
Public Member Functions  
OGRLineString ()  
Create an empty line string.  
virtual OGRLineString *  CurveToLine (double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const 
Return a linestring from a curve geometry.  
virtual OGRGeometry *  getCurveGeometry (const char *const *papszOptions=NULL) const 
Return curve version of this geometry.  
virtual double  get_Area () const 
Get the area of the (closed) curve.  
virtual OGRwkbGeometryType  getGeometryType () const 
Fetch geometry type.  
virtual const char *  getGeometryName () const 
Fetch WKT name for geometry type.  
Protected Member Functions  
virtual OGRCurveCasterToLineString  GetCasterToLineString () const 
virtual OGRCurveCasterToLinearRing  GetCasterToLinearRing () const 
virtual double  get_AreaOfCurveSegments () const 
Get the area of the purely curve portions of a (closed) curve.  
Static Protected Member Functions  
static OGRLineString *  TransferMembersAndDestroy (OGRLineString *poSrc, OGRLineString *poDst) 
static OGRLinearRing *  CastToLinearRing (OGRLineString *poLS) 
Cast to linear ring. 
Concrete representation of a multivertex line.
Note: for implementation convenience, we make it inherit from OGRSimpleCurve whereas SFSQL and SQL/MM only make it inherits from OGRCurve.
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. 
virtual 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 nullterminated list of strings or NULL. See OGRGeometryFactory::curveToLineString() for valid options. 
Implements OGRCurve.
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.
double OGRLineString::get_AreaOfCurveSegments  (  )  const [protected, virtual] 
Get the area of the purely curve portions of a (closed) curve.
This method is designed to be used on a closed convex curve.
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 deapproximating 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 nullterminated 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.