From the sip documentation:
If state is not NULL then the location it points to is set to
describe the state of the returned C/C++ instance and is the
value returned by any %ConvertToTypeCode. The calling code
must then release the value at some point to prevent a memory
leak by calling sipReleaseType().
These methods were only calling sipReleaseType in the case that
an error occurred, which is incorrect -- it should always be
called.
These methods directly work with GEOS geometries and avoid the
forced conversions to/from QgsAbstractGeometry objects, and are
intended for use in chained operations where the intermediate conversions
are not required.
Until now, chunk bounds entity used axis-aligned bboxes in world coordinates (floats)
We are switching to bboxes in map coordinates (doubles) and we use
QgsGeoTransform to react correctly when the origin vector changes.
Because some method (only QgsGeometry::set actually) can be deprecated
only in python, not in C++. But \deprecated triggers the need for Q_DECL_DEPRECATED
There was a previous fix for this protecting some geos calls, but
on newer GEOS versions we get crashes with other methods (eg
calculating centroid) when using geos geometries with empty
interior rings.
Avoid this by ALWAYS defaulting to skipping empty rings when
creating GEOS polygons, UNLESS explicitly asked to. Then, only
explicitly ask to do this when we are using GEOS to validate
a geometry. In all other cases we don't need or want empty rings.
`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.