Skip to content

Commit

Permalink
Update API break docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 25, 2017
1 parent c50ee6d commit c70a47e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/api_break.dox
Expand Up @@ -1269,6 +1269,10 @@ QgsGeometry {#qgis_api_break_3_0_QgsGeometry}
value instead of a pointer. The biggest impact with this change is that PyQGIS code should not compare a geometry
result to None, but instead either use a boolean test (`if g.buffer(10):`) or explicitly use the isNull()
method to determine if a geometry is valid.
- The QgsAbstractGeometry getter was renamed from geometry() to get(), and the setter from setGeometry() to set().
This was done to avoid the awkward "feature.geometry().geometry()" expression! Note that calling QgsGeometry.get()
can force a detach and full clone of the geometry, so it is preferable to use the faster QgsGeometry::constGet()
method if the geometry is not being modified.
- isEmpty() was renamed to isNull() to differentiate a missing geometry from a geometry which is empty (eg an
empty geometry collection)
- wkbSize() and asWkb() has been replaced by exportToWkb(). WKB representation is no longer cached within QgsGeometry
Expand Down

0 comments on commit c70a47e

Please sign in to comment.