AreasandLengthsTask - Results Varialbe Type
I'm using the AreaAndLengthsTask to compare sq. footages of measured polygons to what is stored in one of the attributes.
My area unit is ESRI.ArcGIS.Client.Tasks.LinearUnit.Foot, which I'm told will be squared via the foot unit.
But what I'm having trouble with is determining the type of variable that will be stored in the results.
I can't seem to convert this System.Collections.Generic.List(of Double) unit to the ESRI.ArcGIS.Client.Tasks.AreaAndLengths?
How dones one convert from this double to the AreaAndLenghts unit?
Walter
-
Let me summerize your issue and give my thought.
1. Given: An attribute of the feature has a value '100', which unit 'square of foot' as the area coverage of the polygon. Say, areaOfFeature = 100.
2. Given: 'AreasAndLengthsTask' activity returns a Results (say to 'areasGraphics' which should have a type 'ESRI.ArcGIS.Client.Tasks.AreaAndLengths', and you set 'Area Unit' as 'ESRI.ArcGIS.Client.Tasks.LinearUnit.Foot'.
Then you can assign to a new variable called 'area' whose is Double with 'areasGraphics.Areas.FirstOrDefault()'. So area = areasGraphics.Areas.FirstOrDefault(). Say it set 'area' = 101
3. So now you can compare with two values: (1) areaOfFeature = 100, (2) area = 101 when those 100 and 101 are the same Unit as square of foot.
M Gim
0 -
Thanks Munwhan,
Worked like a charm.
Walter
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare