mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
[1.5.x] Fixed #19366 -- Prevented GEOSIndexError when comparing geometries
Thanks Craig de Stigter for the report and collaboration on the
patch.
Backport of cc3c4a9d5
from master.
This commit is contained in:
parent
a21e8dee76
commit
89593048e2
4 changed files with 48 additions and 10 deletions
|
@ -656,6 +656,17 @@ is returned instead.
|
|||
|
||||
Returns the number of interior rings in this geometry.
|
||||
|
||||
.. admonition:: Comparing Polygons
|
||||
|
||||
Note that it is possible to compare ``Polygon`` objects directly with ``<``
|
||||
or ``>``, but as the comparison is made through Polygon's
|
||||
:class:`LineString`, it does not mean much (but is consistent and quick).
|
||||
You can always force the comparison with the :attr:`~GEOSGeometry.area`
|
||||
property::
|
||||
|
||||
>>> if poly_1.area > poly_2.area:
|
||||
>>> pass
|
||||
|
||||
Geometry Collections
|
||||
====================
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue