`QgsPolyhedralSurface` inherits from `QgsSurface` which implements
`QgsAbstractgeometry::isValid` by calling `isValid` from
GEOS. However, GEOS does not handle polyhedral surface. This means
that `isValid` will always return False even if the polyhedral surface
is valid.
This issue is fixed by implementing
`QgsPolyhedralSurface::isValid`. It checks that all the polygons of
the polyhedral surface are valid.
`surfaceToPolygon` is only useful for `QgsCurvePolygon` which inherits
from `QgsSurface`. The next commit will introduce
`QgsPolyhedralSurface` which also inherits from `QgsSurface`. For
`QgsPolyhedralSurface`, it does not make sense to have
`surfaceToPolygon`.
By moving `surfaceToPolygon` definition in `QgsCurvePolygon` this
allows to keep the functionality.
This method attempts to interpolate the point on a linestringM
where a specified m value falls. It does this by interpolating
M values along the line string segments, finding the first
segment at which the target M value falls. If the M value
corresponds to a part of the line with constant m values, then
the center point of this constant m value portion will be
returned.
Add QgsAbstractGeometry::simplifyByDistance, which is a direct
port of GEOS Douglas Peucker algorithm.
This is a trivial algorithm to implement, and we benefit from
avoiding the conversion to/from GEOS geometries.
Deprecating QgsGeometry::addPart in favor of QgsGeometry::addPartV2
to use Qgis::WkbType instead of Qgis::GeometryType because the latter
can't handle curved geometries (not specific enough).
Fixes#57255
Allows extraction of matching parts from a collection, returning
the corresponding collection subclass.
mixed_collection = QgsGeometryCollection()
mixed_collection.addGeometry(... mix of geometry types ...)
multi_line_string = mixed_collection.extractPartsByType(Qgis.WkbType.LineString)
In this case multi_line_string will be a QgsMultiLineString object,
containing just the line string parts from mixed_collection