GDAL
Public Member Functions | Static Public Member Functions | Protected Member Functions
OGRMultiPolygon Class Reference

A collection of non-overlapping OGRPolygon. More...

#include <ogr_geometry.h>

Inheritance diagram for OGRMultiPolygon:
OGRMultiSurface OGRGeometryCollection OGRGeometry

List of all members.

Public Member Functions

 OGRMultiPolygon ()
 Create an empty multi polygon collection.
virtual const char * getGeometryName () const
 Fetch WKT name for geometry type.
virtual OGRwkbGeometryType getGeometryType () const
 Fetch geometry type.
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 OGRBoolean hasCurveGeometry (int bLookForNonLinear=FALSE) const
 Returns if this geometry is or has curve geometry.

Static Public Member Functions

static OGRMultiSurfaceCastToMultiSurface (OGRMultiPolygon *poMP)
 Cast to multisurface.

Protected Member Functions

virtual OGRBoolean isCompatibleSubType (OGRwkbGeometryType) const

Detailed Description

A collection of non-overlapping OGRPolygon.


Member Function Documentation

Cast to multisurface.

The passed in geometry is consumed and a new one returned .

Parameters:
poMPthe input geometry - ownership is passed to the method.
Returns:
new geometry.
OGRErr OGRMultiPolygon::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:
ppszDstTexta text buffer is allocated by the program, and assigned to the passed pointer. After use, *ppszDstText should be freed with OGRFree().
eWkbVariantthe 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 OGRMultiSurface.

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

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 OGRMultiSurface.

OGRBoolean OGRMultiPolygon::hasCurveGeometry ( int  bLookForNonLinear = FALSE) const [virtual]

Returns if this geometry is or has curve geometry.

Returns if a geometry is, contains or may contain a CIRCULARSTRING, COMPOUNDCURVE, CURVEPOLYGON, MULTICURVE or MULTISURFACE.

If bLookForNonLinear is set to TRUE, it will be actually looked if the geometry or its subgeometries are or contain a non-linear geometry in them. In which case, if the method returns TRUE, it means that getLinearGeometry() would return an approximate version of the geometry. Otherwise, getLinearGeometry() would do a conversion, but with just converting container type, like COMPOUNDCURVE -> LINESTRING, MULTICURVE -> MULTILINESTRING or MULTISURFACE -> MULTIPOLYGON, resulting in a "loss-less" conversion.

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

Parameters:
bLookForNonLinearset it to TRUE to check if the geometry is or contains a CIRCULARSTRING.
Returns:
TRUE if this geometry is or has curve geometry.
Since:
GDAL 2.0

Reimplemented from OGRMultiSurface.

OGRErr OGRMultiPolygon::PointOnSurface ( OGRPoint poPoint) const [virtual]

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

NOTE: Only implemented when GEOS included in build.

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

Reimplemented from OGRMultiSurface.


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

Generated for GDAL by doxygen 1.7.6.1.