olwidget
olwidget copied to clipboard
Large multipolygon that can be viewed, edited, but not saved after editing
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.)
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?
nope, sorry, no ideas.