Merge Features
I am trying to copy multiple features into a new layer, and merge the copied features into one new feature. Does anyone have a workflow or any suggestions on how to accomplish this. Thank you.
0
-
Hi Nataliya,
If you want to copy the geometry of multiple features, merge them into one shape and then use that to create a new feature, then your workflow can be laid out like this:
1. Using the "Display Capture Geometry" to allow the user to select the geometries they want
2. Reference the output from the "Display Capture Geometry" activity in the "Query Task" activity to select the features
3. Reference the output feature set in the "Union Task" activity to merge all the geometries into one.
4. Assign the resulting geometry to the new feature. You can create the new feature and assign the geometry to it in a series of Assign activities like this:newFeature = new Graphic() newFeature.Geometry = unionTaskOutputGeometry5. If you want to assign the newFeature some attributes as well, then you can do it like this:newFeature.Attributes("ColumnName") = "someValue"
6. Create a feature set using the "Create Collection <T>" activity and specifying the data type "feature set" when prompted.
7. Add the newFeature to the new feature set using the "Add to Collection" activity
8. Reference the new feature set in the "Add Features" activity to add the new feature to the feature layer.
I hope this helps. I would suggest taking a look at this code gallery sample:
https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_SEARCH_RESULT&id=kA4600000004EWU
to help you get started.
Carmen0 -
Carmen,
Thank you from you help. I finally got back to the project that I needed this workflow for. And I got it to work. Thanks, again.
Nataliya0 -
Nataliya, we are attempting to do something similar, would you mind sharing your workflow so we can build on it please? 0 -
Beck,
Below is a link to download my workflow. A side note, I am copying features from two different sources, hence I had to include the 'paraller' activity. I don't know if you need that or not.
This site wouldn't let me paste the workflow here (even if I break it into multiple posts), keeps telling me, too many characters. Anyways, here is a google drive link where you can download my workflow:
https://drive.google.com/file/d/0B2qYrt9BNmHPRUhTYlVzX1Y3Q1E/view?usp=sharing
I hope it helps.
Nataliya0 -
LEGEND! Thankyou very much for sharing. 0 -
My workflow for the copy/merge and paste features, that has been working flowlessly for the last 1.5 years, all of a sudden started throwing an error. Any one has seen this error before?
"There was a workflow error running activity: Exception has been thrown by the target of an invocation. Workflow 'copyFeature' failed Unhandled exception: 'One or more errors occurred.' in activity '1.32: UnionTask'. One or more errors occurred. The underlying connection was closed: An unexpected error occurred on a send. Authentication failed because the remote party has closed the transport stream."
Thank you,
Nataliya0 -
Hi Nataliya,
Check to see what Geometry service is being used. Based on the error, it appears the Geometry service may have been changed to only accept TLS 1.2 connections. You can change the service being used or update Essentials to force it to use TLS 1.2 (https://support.geocortex.com/essentialsGSCkba?sub-nav=kba&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_DETAIL&criteria=BESTANSWERS&id=kA360000000L14bCAC)
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner0 -
Hi Wayne,
I am using esri geometry service: https://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer
Thanks,0 -
I believe they may have "locked" that down last week, to only accept TLS 1.2 connections. You can try using another service, like on a local ArcGIS server you might have running or you can implement the workaround in the article I mentioned above. The workaround involves adding 2 registry settings to the Geocortex server and restarting it.
Regards,
Wayne0 -
As a short time solution I switched to http instead of https for the same Esri geometry service. And now my workflow is working again!!!
Thank you very much for quick response.
Nataliya0 -
OK, no problem.
I would look for a long term solution though, browsers are unpredictable and if you launch the viewer in https a browser may or may not block a call to http. In your case the server is making the call because it is a workflow. In the case of a viewer, your measurements may no longer show values.
Regards,
Wayne0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
11 Kommentare