OGRMultiSurface Class Reference

#include <ogr_geometry.h>

Inheritance diagram for OGRMultiSurface:
OGRGeometryCollection OGRGeometry OGRMultiPolygon

List of all members.

Public Member Functions

 OGRMultiSurface ()
 Create an empty multi surface collection.
 OGRMultiSurface (const OGRMultiSurface &other)
 Copy constructor.
OGRMultiSurface & operator= (const OGRMultiSurface &other)
 Assignment operator.
virtual const char * getGeometryName () const
 Fetch WKT name for geometry type.
virtual OGRwkbGeometryType getGeometryType () const
 Fetch geometry type.
virtual OGRErr importFromWkt (char **)
 Assign geometry from well known text data.
virtual OGRErr exportToWkt (char **, OGRwkbVariant=wkbVariantOldOgc) const
 Convert a geometry into well known text format.
virtual OGRErr PointOnSurface (OGRPoint *poPoint) const
 This method relates to the SFCOM IMultiSurface::get_PointOnSurface() method.
virtual int getDimension () const
 Get the dimension of this object.

Static Public Member Functions

static OGRMultiPolygon * CastToMultiPolygon (OGRMultiSurface *poMS)
 Cast to multipolygon.

Detailed Description

A collection of non-overlapping OGRSurface.

Since:
GDAL 2.0

Constructor & Destructor Documentation

OGRMultiSurface::OGRMultiSurface ( const OGRMultiSurface &  other  ) 

Copy constructor.

Note: before GDAL 2.1, only the default implementation of the constructor existed, which could be unsafe to use.

Since:
GDAL 2.1

Member Function Documentation

OGRMultiPolygon * OGRMultiSurface::CastToMultiPolygon ( OGRMultiSurface *  poMS  )  [static]

Cast to multipolygon.

This method should only be called if the multisurface actually only contains instances of OGRPolygon. This can be verified if hasCurveGeometry(TRUE) returns FALSE. It is not intended to approximate curve polygons. For that use getLinearGeometry().

The passed in geometry is consumed and a new one returned (or NULL in case of failure).

Parameters:
poMS the input geometry - ownership is passed to the method.
Returns:
new geometry.

References OGRSurface::CastToPolygon().

Referenced by OGRGeometryFactory::forceToMultiPolygon().

virtual OGRErr OGRMultiSurface::exportToWkt ( char **  ppszDstText,
OGRwkbVariant  eWkbVariant = wkbVariantOldOgc 
) const [virtual]

Convert a geometry into well known text format.

This method relates to the SFCOM IWks::ExportToWKT() method.

This method is the same as the C function OGR_G_ExportToWkt().

Parameters:
ppszDstText a text buffer is allocated by the program, and assigned to the passed pointer. After use, *ppszDstText should be freed with OGRFree().
eWkbVariant the specification that must be conformed too :

  • wbkVariantOgc for old-style 99-402 extended dimension (Z) WKB types
  • wbkVariantIso for SFSQL 1.2 and ISO SQL/MM Part 3
Returns:
Currently OGRERR_NONE is always returned.

Reimplemented from OGRGeometryCollection.

Reimplemented in OGRMultiPolygon.

int OGRMultiSurface::getDimension (  )  const [virtual]

Get the dimension of this object.

This method corresponds to the SFCOM IGeometry::GetDimension() method. It indicates the dimension of the object, but does not indicate the dimension of the underlying space (as indicated by OGRGeometry::getCoordinateDimension()).

This method is the same as the C function OGR_G_GetDimension().

Returns:
0 for points, 1 for lines and 2 for surfaces.

Reimplemented from OGRGeometryCollection.

const char * OGRMultiSurface::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().

Returns:
name used for this geometry type in well known text format. The returned pointer is to a static internal string and should not be modified or freed.

Reimplemented from OGRGeometryCollection.

Reimplemented in OGRMultiPolygon.

OGRwkbGeometryType OGRMultiSurface::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().

Returns:
the geometry type code.

Reimplemented from OGRGeometryCollection.

Reimplemented in OGRMultiPolygon.

References wkbMultiSurface, wkbMultiSurfaceM, wkbMultiSurfaceZ, and wkbMultiSurfaceZM.

OGRErr OGRMultiSurface::importFromWkt ( char **  ppszInput  )  [virtual]

Assign geometry from well known text data.

The object must have already been instantiated as the correct derived type of geometry object to match the text type. This method is used by the OGRGeometryFactory class, but not normally called by application code.

This method relates to the SFCOM IWks::ImportFromWKT() method.

This method is the same as the C function OGR_G_ImportFromWkt().

Parameters:
ppszInput pointer to a pointer to the source text. The pointer is updated to pointer after the consumed text.
Returns:
OGRERR_NONE if all goes well, otherwise any of OGRERR_NOT_ENOUGH_DATA, OGRERR_UNSUPPORTED_GEOMETRY_TYPE, or OGRERR_CORRUPT_DATA may be returned.

Reimplemented from OGRGeometryCollection.

References OGRGeometryCollection::addGeometryDirectly(), and OGRGeometryFactory::createFromWkt().

OGRMultiSurface & OGRMultiSurface::operator= ( const OGRMultiSurface &  other  ) 

Assignment operator.

Note: before GDAL 2.1, only the default implementation of the operator existed, which could be unsafe to use.

Since:
GDAL 2.1

Reimplemented from OGRGeometryCollection.

Reimplemented in OGRMultiPolygon.

OGRErr OGRMultiSurface::PointOnSurface ( OGRPoint *  poPoint  )  const [virtual]

This method relates to the SFCOM IMultiSurface::get_PointOnSurface() method.

NOTE: Only implemented when GEOS included in build.

Parameters:
poPoint point to be set with an internal point.
Returns:
OGRERR_NONE if it succeeds or OGRERR_FAILURE otherwise.

Reimplemented in OGRMultiPolygon.


The documentation for this class was generated from the following files:

Generated for GDAL by doxygen 1.6.1.