I'm want to get the lines of a polygon and then get the length of each line, I'm looking on how to do this, Can anyone show me some code? Does anyone have any pointers on how to do this?
I'm using ArcGis Server 9.3.1 and Visual Studio .NET. Thanks.
|
I'm want to get the lines of a polygon and then get the length of each line, I'm looking on how to do this, Can anyone show me some code? Does anyone have any pointers on how to do this? I'm using ArcGis Server 9.3.1 and Visual Studio .NET. Thanks. |
|||||||||
|
|
I'd use the REST api to formulate a url like this: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/1/query?text=New+York&outSR=102113&f=pjson And use either the Silverlight/WPF sdk or Json.NET to parse the rings out of the geometry, and sum up their lengths. |
|||
|
|
|
Given the coordinates of the polygon (in order), you can use the formula found here to calculate the distance for each line in the polygon. |
|||