HTML5 Viewer - Cut Polygon in an Editable Feature Service by a Line
Hello,
We have polygons in an editable feature service served out through an HTML5 viewer. User can create new polygons, edit attributes, and edit vertices of existing polygons.
We would like user to be able to split or cut a polygon in the feature service by drawing a line. Does anyone have a workflow that will accomplish this?
I've taken a stab at it using the Cut Task in a workflow, which gets the geometry and successfully cuts it, but it does not update the actual feature service so that the cut polygons persist.
Matt
0
-
I managed to work it out on my own. This is an extremely draft version with no error checking at this point, so use at your own risk. To use this, you'll need to update two variables in the workflow:
stringURLGeomteryServer - set this to the URL of your geometry server
stringURLFeatureServiceLayer - set this to the URL of your polygon feature layer that you'd like to cut
Please note that this was developed for a polgon feature class that does not contain overlapping polygons. The workflow allows you to draw a freehand line across a polygon (or multiple polygons) and it will cut those polygons. The original polygon is deleted and the new resulting cut polygons inherit the attributes of the original polygons.
Here si the link to my workflow in case it may help others.
http://www.cvwdgis.org/geocortex/workflows/CutPolygon.xaml0 -
Thank you for sharing! 0 -
Can anyone shed any light on when/if advanced editing tasks such as cut/merge will make it into the HTML5 viewer? This would help keep our data quality good. 0 -
I am waiting for more advanced editing tools aswell. 0 -
Still waiting as far as I can tell 0 -
Matthew the link you provided to your workflow no-longer works. Is there any chance you could post it as a code snippet? I'm trying ot build a workflow for this myself and am getting quite stuck - an example would be really helpful. Thanks! 0 -
me too :)
if you could post it again that would be great!0 -
My apologies for the extremely delayed response. You can download vis this link:
http://www.cvwdgis.org/workflows/CutPolygon.xaml0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
8 Kommentare