[Django] #22357: Sometimes the OSMWidget highlights the outer area of a Polygon / MultiPolygon

24 views
Skip to first unread message

Django

unread,
Mar 30, 2014, 12:20:36 PM3/30/14
to django-...@googlegroups.com
#22357: Sometimes the OSMWidget highlights the outer area of a Polygon /
MultiPolygon
----------------------------+--------------------
Reporter: babu | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords: osm
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 1
----------------------------+--------------------
I've seen this behaviour in Chrome (33.0.1750.152) and Firefox (28.0) on
Linux.
I'll attach the images, the geojson file and the coordinates to reproduce
this issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/22357>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 30, 2014, 12:40:04 PM3/30/14
to django-...@googlegroups.com
#22357: Sometimes the OSMWidget highlights the outer area of a Polygon /
MultiPolygon
------------------------+--------------------------------------

Reporter: babu | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: osm | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
------------------------+--------------------------------------
Changes (by babu):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

The coordinates are around 39.21512,9.09424
[http://www.openstreetmap.org/search?query=39.2142%2C9.0999#map=16/39.2142/9.0999]

The field is a MultiPolygon.

--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:1>

Django

unread,
Mar 31, 2014, 2:54:33 PM3/31/14
to django-...@googlegroups.com
#22357: Sometimes the OSMWidget highlights the outer area of a Polygon /
MultiPolygon
------------------------+--------------------------------------

Reporter: babu | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: osm | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
------------------------+--------------------------------------

Comment (by babu):

models.py
{{{#!django
from django.contrib.gis.db import models as gis_models
from django.db import models

class County(models.Model):
name = models.CharField(max_length=255, blank=True)
code = models.CharField(max_length=30)
shape = gis_models.MultiPolygonField(blank=True, null=True,
geography=True, srid=4326)
}}}

admin.py
{{{#!django
from django.contrib.gis import admin
admin.site.register(County, admin.OSMGeoAdmin)
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:2>

Django

unread,
Jun 6, 2014, 12:14:15 PM6/6/14
to django-...@googlegroups.com
#22357: Sometimes the OSMWidget highlights the outer area of a Polygon /
MultiPolygon
------------------------+------------------------------------

Reporter: babu | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: osm | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------
Changes (by aaugustin):

* ui_ux: 1 => 0
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:3>

Django

unread,
Nov 15, 2014, 6:28:51 AM11/15/14
to django-...@googlegroups.com
#22357: Sometimes the OSMWidget highlights the outer area of a Polygon /
MultiPolygon
------------------------+------------------------------------

Reporter: babu | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: osm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------

Comment (by reinout):

Your screenshots aren't totally clear as they don't show the full picture.
Probably, in the "right" case the polygon's contents are highlighted and
in the two "wrong" cases the area *around* the polygon is highlighted
instead?

My first thought is about the order in which the polygon's points are
placed. Clockwise or counter-clockwise. In one of the two, the polygon
should be treated as a hole instead of an area.

But... you're using exactly the same database content. So the order of
points cannot have changed. Django's database layer will return the same
result, independent of the browser used.

The problem thus must be in the javascript that renders the map:
openlayers. Django uses openlayers.

Openlayers is loaded with a url:
https://docs.djangoproject.com/en/dev/ref/contrib/gis/admin/#django.contrib.gis.admin.GeoModelAdmin.openlayers_url
, currently http://openlayers.org/api/2.11/OpenLayers.js

I'd say: check if a newer openlayers version still has the problem or if
it is fixed.

To me, this almost cannot be a django problem. I'd suggest closing the
ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:4>

Django

unread,
Nov 28, 2021, 11:34:18 AM11/28/21
to django-...@googlegroups.com
#22357: Sometimes the OSMWidget highlights the outer area of a Polygon /
MultiPolygon
-----------------------------+--------------------------------------
Reporter: Marco Badan | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: dev
Severity: Normal | Resolution: worksforme

Keywords: osm | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by Claude Paroz):

* status: new => closed
* resolution: => worksforme


Comment:

Closing for inactivity and no similar reports in recent times.

--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:5>

Reply all
Reply to author
Forward
0 new messages