- len(QgsCurve) returns number of points in curve
- raise IndexErrors when calling pointN, xAt, yAt, zAt, mAt, setXAt, setYAt,
setMAt, setZAt with invalid vertex indices
- Add [] getter for retrieving specific vertices, eg. ls[0] returns QgsPoint(...)
- Add [] setter for setting specific (existing) vertices, e.g. ls[1] = QgsPoint(1,2)
- Add del support for removing vertices, e.g. del ls[1] removes the second vertex
All your uses of toUtf8().data() actually just need a const char*
So use constData() that is semantically more correct, and documented
to be faster.
From http://doc.qt.io/qt-5/qbytearray.html#data
"For read-only access, constData() is faster because it never
causes a deep copy to occur."
Avoid conversion to/from WKB at OGR/QGIS side, and just directly
utilise OGR geometry API to construct QGIS geometries.
Shaves ~10% off rendering time for a large point layer (GPKG)
Because:
- Exactly follows curves and doesn't require segmentizing input geometry
- Also interpolates z/m values if they are present in input geometry
- Is faster
Returns a new curve representing a substring of a curve, from
a start distance and end distance.
If z or m values are present, the output z and m will be interpolated using
the existing vertices' z or m values.
Handles curved geometries without loss.
Checks whether a function declaration has parameters that are
top level const.
const values in declarations do not affect the signature of a
function, so they should not be put there.