Commit a71fc544 authored by Sergey Fedoseev's avatar Sergey Fedoseev Committed by Tim Graham
Browse files

[1.8.x] Fixed #25660 -- Documented GEOSGeometry.dims

Backport of f98126a0 from master
parent a31973c7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -172,6 +172,17 @@ Properties

Returns the coordinates of the geometry as a tuple.

.. attribute:: GEOSGeometry.dims

Returns the dimension of the geometry:

* ``0`` for :class:`Point`\s and :class:`MultiPoint`\s
* ``1`` for :class:`LineString`\s and :class:`MultiLineString`\s
* ``2`` for :class:`Polygon`\s and :class:`MultiPolygon`\s
* ``-1`` for empty :class:`GeometryCollection`\s
* the maximum dimension of its elements for non-empty
  :class:`GeometryCollection`\s

.. attribute:: GEOSGeometry.empty

Returns whether or not the set of points in the geometry is empty.