Obtain Coordinates from Object
After a buffer is run and several objects are found within that buffer, how is it possible to obtain their map coordinates?
Working on a "find nearest" workflow and now I need feed the distance activity with the coordinates of the hydrants that have been found within
the buffer.
Walter
-
Use the Get Geometries activity on the feature set resulting from your query task with the buffer geometry to get all the geometries in a list.
But because I think you also need the name/code of the hydrants I think it's better loop over the feature set with a For Each activity and calculate the individual distances. You can get the geometry with the Geometry property of the graphic (graphicvariable.Geometry).
0 -
Nico,
I'm trying to apply your suggestions with regards to using a forEach<Graphic> loop. But I'm having difficulty in converting the GetGeometries results, which
which is Ienumerable<Geometry>
In the assign statement where the error is, I have:
NewGraphic.geometry = Hydrant_Geometry_InBuffer, but this is not working?
/customer/servlet/servlet.FileDownload?file=00P6000000em1KlEAI
Any help would be appreciated.
Walter
0 -
Try NewGraphic.geometry = Hydrant_Geometry_InBuffer.First
(perhaps you need to import the System.Linq library to use this)
Other advice: I see in the For Each actvity you use just Hydrant_FeatureSet, I think you should use Hydrant_FeatureSet.Features here.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare