43 if ( dynamic_cast<const QgsSurfaceV2*>( geom ) )
55 return elemMultiPolygon;
63 if ( dynamic_cast<const QgsSurfaceV2*>( geom ) )
71 return elemMultiSurface;
77 QString json =
"{\"type\": \"MultiPolygon\", \"coordinates\": [";
80 if ( dynamic_cast<const QgsSurfaceV2*>( geom ) )
88 exteriorLineString->
points( exteriorPts );
90 delete exteriorLineString;
96 interiorLineString->
points( interiorPts );
98 delete interiorLineString;
120 if ( !dynamic_cast<QgsSurfaceV2*>( g ) )
const QgsCurveV2 * exteriorRing() const
QDomElement asGML2(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML2 representation of the geometry.
QDomNode appendChild(const QDomNode &newChild)
QgsAbstractGeometryV2 * clone() const override
Clones the geometry by performing a deep copy.
void points(QList< QgsPointV2 > &pt) const override
Returns a list of points within the curve.
bool fromWkt(const QString &wkt) override
Sets the geometry from a WKT string.
static QString pointsToJSON(const QList< QgsPointV2 > &points, int precision)
Returns a geoJSON coordinates string.
Abstract base class for all geometries.
QDomElement createElementNS(const QString &nsURI, const QString &qName)
Line string geometry type.
QDomElement asGML3(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML3 representation of the geometry.
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
Adds a geometry and takes ownership.
Multi surface geometry collection.
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
void setZMTypeFromSubGeometry(const QgsAbstractGeometryV2 *subggeom, QgsWKBTypes::Type baseGeomType)
Updates the geometry type based on whether sub geometries contain z or m values.
virtual QDomElement asGML3(QDomDocument &doc, int precision=17, const QString &ns="gml") const =0
Returns a GML3 representation of the geometry.
bool fromCollectionWkt(const QString &wkt, const QList< QgsAbstractGeometryV2 * > &subtypes, const QString &defaultChildWkbType=QString())
Reads a collection from a WKT string.
const QgsCurveV2 * interiorRing(int i) const
QVector< QgsAbstractGeometryV2 * > mGeometries
virtual QgsLineStringV2 * curveToLine() const =0
Returns a new line string geometry corresponding to a segmentized approximation of the curve...
QDomElement asGML2(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML2 representation of the geometry.
virtual bool addGeometry(QgsAbstractGeometryV2 *g)
Adds a geometry and takes ownership.
Curve polygon geometry type.
int numInteriorRings() const
QString asJSON(int precision=17) const override
Returns a GeoJSON representation of the geometry.