Areas and Lengths
Is there an activity for running a geometry service's area and lengths operation? I would like to add a check in my workflow that processes an extract request in application or to email based on the amount of area selected. I see the simplify task is available, but not all of the other geometry operations unless I just missed it.
Marc
-
Hi Mark,
There isn't currently an activity that does this. We will build it though. It is too late to get this into the next release, but this will make it into the following (non-maintenance) release.
In that future release we intend to support the following geometry service operations:
- AreasAndLengths
- Distance
- Generalize
- Lengths
--Ryan
0 -
Thanks. That will be a nice addition.
In the interim is there anyway to setup and run an async rest call from workflow. I could then just run the geometry service call in a generic way with a json response.
Marc
0 -
The 3.7 release of Essentials will be out very soon. It contains two new activities (DownloadString and WebRequest) that allow you to perform arbitrary web requests.
If you need something immediately you've got a couple options but they will likely be quite confusing for non coders:
- It is possible to use the InvokeMethod activity to call the DownloadString method on a System.Net.WebClient object. This uses .NET reflection to dynamically invoke methods. It will allow you to make the REST call to the geometry service and you can parse the response.
- You could convert your ArcGIS Server polygons to Geocortex polygons which have built-in support for areas. You can use Geocortex.Workflow.ArcGisClientGeometryConverter.FromArcGisClientGeometry(geometry) to get a Geocortex geometry, then cast it to a Geocortex Polygon, then access the Area property.
--Ryan
0 -
The new activities should be handy. Thanks.
Regarding the second option you described, I assume this would be done in workflow by using the ArcGISClientToGeocortexGeometry activity and using the input from a Display Capture Geometry Activity result and specifying the output for the ArcGISClientToGeocortexGeometry to be a Geocortex.Gis.Geometries.Geometry. Is that right? The piece I don't follow is how to cast it to the Geocortex Polygon in workflow. What unit is the area for a Geocortex Polygon?
Marc
0 -
I am trying to use the new Areas and Lengths activity in the workflow and I am trying to get the input Graphics to be the output from the capture geometry but I have yet to figure out how to convert the geometry to a graphic for the task. Any tips would be appreciated.
Marc
0 -
Hi Marc,
There are several ways to do this, but the simplest one would be to create a FeatureSet object from your geometry. A FeatureSet exposes a property that is a list of Graphics, which is what you need to pass to the Areas and Lengths Task.
- Let's assume you already have a Geometry in a variable called "geometry".
- Create a new variable called "featureSet" that is of type "ESRI.ArcGIS.Client.Tasks.FeatureSet".
-
Add an Assign activity to your workflow:
- Set the To field to your "featureSet" variable.
- Set the From field to the expression "new FeatureSet(geometry)"
- In the Graphics field of the Areas and Lengths Task you can now use the expression "featureSet.Features".
--Ryan
0 -
Thanks. That worked.
0
Please sign in to leave a comment.
Comments
7 comments