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.
In python, the wkb type of a QgsPoint will by default be determined from
the provided parameters, where Z and M will be added as required if the
wkbType is Undefined.
QgsPoint(x, y, z=nan, m=nan, wkbType=QgsWkbTypes.Undefined)
Thanks to the python API support of named parameters, it's also
straightforward to specify z, m and wkbType in any desired combination.
On the other hand, on C++ side it's often preferable to use
QgsPoint(QgsWkbTypes::WkbType wkbType, double x, double y, double z, double m);
due to the lack of named parameters which make it harder to specify a
specific type and the advantage of typesafety that makes it possible to
verload the first constructor with this one.
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.
Instead of requiring all linestrings to be constructed by
first creating QgsPointSequence (requiring creation or
conversion of points to QgsPointV2), allow construction
of LineStrings directly from vectors of values (fastest!)
or lists of QgsPoint.
Likely results in speedups for lots of geometry operations,
but using the same layer as earlier tested for densify
improvements the densify operation time dropped further
from 25 seconds to 15 seconds.
- Add QgsGeometry method to densify by distance
- Fix bug in processing algorithm which resulted in duplicate
vertices and incorrectly spaced extra vertices
Adds a new geometry class for Triangle geometries
Methods include orthocenter, bisectors, medians, medial, circumscribed (center,
radius), inscribed (center, radius)
Also adds make_triangle expression function for creating triangles