olwidget icon indicating copy to clipboard operation
olwidget copied to clipboard

Large multipolygon that can be viewed, edited, but not saved after editing

Open slinkp opened this issue 13 years ago • 2 comments

I haven't firebugg'd through the olwidget code on this yet, but if I have a Django object with a GeometryField that contains this multipolygon: https://gist.github.com/1002741 ... then if I load the object up in django-admin with a GeoModelAdmin UI, I can save if I don't change anything.

But if I try to edit the geometry by eg. deleting a few points, and I click save, I can see that the POST request does not contain the geometry at all and django throws a validation error. So it seems to be a client-side problem of some kind.

(fwiw, the multipolygon was generated by taking the union of a bunch of zip codes, and subtracting the union of a bunch of neighborhoods - so it's basically "everything inside a boston zip code that isn't in a known neighborhood", and it has a lot of little crufty bits scattered around that are probably just noise from not-quite-overlapping neighborhood bounds.)

slinkp avatar Jun 01 '11 17:06 slinkp

Indeed; I can reproduce that -- viewing, editing fine; saving not. GEOS is throwing:

GEOS_ERROR: IllegalArgumentException: Invalid number of points in LinearRing found 3 - must be 0 or >= 4

Did you get any progress on figuring out why?

yourcelf avatar Jul 21 '11 00:07 yourcelf

nope, sorry, no ideas.

slinkp avatar Dec 08 '11 21:12 slinkp