Ticket #250 (closed defect: worksforme)
geos_contains(multipolygon, polygon) returns false when it should return true
| Reported by: | cdestigter | Owned by: | mloskot |
|---|---|---|---|
| Priority: | major | Milestone: | 3.1.1 |
| Component: | Default | Version: | 3.0.0 |
| Severity: | Unassigned | Keywords: | |
| Cc: |
Description
In geodjango:
from django.contrib.gis import geos g1 = geos.GEOSGeometry('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))') g2 = geos.GEOSGeometry('POLYGON((1 1,1 2,2 2,2 1,1 1))') g1.contains(g2) => False g2.within(g1) => False
Both of the above should return True. The following combinations work fine though: polygon.contains(polygon) multipolygon.contains(multipolygon) polygon.contains(multipolygon)
It's possible this has been fixed in a more recent version, though I couldn't find any existing tickets on it. Feel free to close if that's the case, stating when it was fixed.
Change History
Note: See
TracTickets for help on using
tickets.
