Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
slinkp opened this issue Jun 1, 2011 · 2 comments

Comments

@slinkp
Copy link
Contributor

slinkp commented Jun 1, 2011

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.)

@yourcelf
Copy link
Owner

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?

@slinkp
Copy link
Contributor Author

slinkp commented Dec 8, 2011

nope, sorry, no ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants