Ecotrust / madrona

A software framework for effective place-based decision making
Other
52 stars 9 forks source link

server-side process for clipping MPAs to each other #317

Closed perrygeo closed 12 years ago

perrygeo commented 12 years ago

We need a way to eliminate overlap between MPAs. Issue 320 will add client-side functionality to kmlEditor/kmlTree to allow for multiple-select on MPAs (and Arrays or anything). Atom links will then be able to define "actions" that can be run on multiple MPAs.

I'm imagining the server-side component of this would be a webservice which would accept requests like GET /clipping_form? shape=http://path/to/mpa/resource&shape=http://path/to/another/mpa That would return a form that would show up in the sidebar, allowing a user to order the clipping operation (what gets clipped to what). That form could then be posted back with the ordering and the MPAs would be clipped. Only the clipped geometry would be modified on the MPA, so if the user wanted to undo the action they could just edit their geometry.

What would make this even more useful then, is a little summary in the Array attributes screen of where in your Array there is overlap. That summary could contain a link to /clipping_form with the appropriate shapes pre-populated.

We should discuss this functionality during a dev call once we start 1.3. I know Jared has some strong opinions about how this functionality should work and we'll want his input.

Google Code Info: Issue #: 321 Author: underbluewaters Created On: 2010-03-29T15:51:21.000Z Closed On: 2010-05-31T17:17:10.000Z

perrygeo commented 12 years ago

Issue 228 has been merged into this issue.

Google Code Info: Author: underbluewaters Created On: 2010-03-29T15:51:55.000Z

perrygeo commented 12 years ago

Google Code Info: Author: underbluewaters Created On: 2010-04-08T15:38:27.000Z

perrygeo commented 12 years ago

I had some work done on this already so i checked it in; revision r1443.

When you do a get request supplying some mpa ids: http://localhost:8000/mpas/clip/?mpaid=1000017&mpaid=1000018&mpaid=1000016

you get a form with some fancy js stuff that allows the list items to be sorted by drag-n-drop and then posted in that order to the same URL. The order determines clipping precedence.

The server-side view uses the geodjango methods to clip the mpas according to their order. I tried to put in a number of checks to handle all the edge cases but there will no doubt be wierd GEOS errors popping up in its current state.

All in all it works pretty well for the common cases but is not yet integrated with marinemap as we still have some UI/workflow issues to figure out first.

Google Code Info: Author: perrygeo...@gmail.com Created On: 2010-04-13T20:11:48.000Z

perrygeo commented 12 years ago

Issue 335 has been merged into this issue.

Google Code Info: Author: underbluewaters Created On: 2010-04-16T04:52:37.000Z

perrygeo commented 12 years ago

moving this to milestone 1.4

Google Code Info: Author: sfletche@gmail.com Created On: 2010-04-26T18:19:06.000Z

perrygeo commented 12 years ago

After discussing this with Charles, it doesn't seem like this approach is going to solve our problem. It makes it possible that users could draw shapes in a way that creates topologically correct MPAs, but only at one boundary. It's unlikely that users would even go thru the trouble to do this though. If it doesn't make hand-fixing of the MPA boundaries unnecessary there isn't much point in adding it to the interface.

A better solution would be to have some process that actually does edge-matching. That would be great, but I don't think we have time for it :(

Google Code Info: Author: underbluewaters Created On: 2010-05-31T17:17:10.000Z