Instead move it to a private QgsGeometry member. It's copied
with QgsGeometry, but not the underlying private geometry
data.
This means the error string can be changed without detaching
(and copying) the geometry data.
Also make greater use of error string for all use of GEOS
functions.
When methods are called that use GEOS to create new geometries, the
result geometries now contain information about what has gone wrong in
case of an error.
In practice, this means it's possible to give more detailed information
in place (and not only in the message log) when things like processing
algorithms fail.
Subdivides the geometry. The returned geometry will be a collection
containing subdivided parts from the original geometry, where no
part has more then the specified maximum number of nodes.
Geometries are passed as const reference and returned by value.
This make using the API easier and reduces the risk of ownership
problems.
The overhead is minimal due to implicit sharing.
Fix https://github.com/qgis/qgis3.0_api/issues/68
Previously this was always read from settings when using
QgsGeometryValidator. It's now an explicit argument
when constructing QgsGeometryValidator or calling the
static validation methods, allowing choice of internal/GEOS
validation methods.
Helps remove more QgsSettings use from core.
- Add QgsGeometry method to densify by distance
- Fix bug in processing algorithm which resulted in duplicate
vertices and incorrectly spaced extra vertices
Faster than QgsGeometry::isGeosEmpty() because it avoids the
conversion to GEOS geometries and just uses the QgsAbstractGeometry
subclasses directly.
Also implements faster isEmpty() overrides for specific
QgsAbstractGeometry subclasses.
This introduces QgsGeometry::makeValid() which will try to make a valid
geometry out of invalid one. This is more complicated method than just
doing a buffer with zero width, but it should not loose any vertices.
Finally we should have a reliable way in QGIS to fix bad geometries!
Ported the C code from lwgeom library to QGIS.
Adds a new QgsGeometry::orthagonalize method which tries to make
angles in geometries either right angles or straight lines
Also adds a processing algorithm exposing this feature.
Implements a method in QgsGeometry and a processing algorithm to
calculate the pole of inaccessibility for a surface, which is the
most distant internal point from the boundary of the surface. This function
uses the 'polylabel' algorithm (Vladimir Agafonkin, 2016), which is an iterative
approach guaranteed to find the true pole of inaccessibility within a specified
tolerance. More precise tolerances require more iterations and will take longer
to calculate.