rwmeier

Geometry Service - Areas and Length

Discussion created by rwmeier on Jul 11, 2011
Latest reply on Jun 21, 2012 by dvela
I am trying to do this operation with the Silverlight API and was getting what I think is incorrect data, so I went and tried to do the same with the REST interface and am getting the same error.

I am using 102100 as my input SR, here is the ring I am using,
[
{
  "rings" : [
   [[-10538362.6559228,4720678.36533211],
   [-10536290.0466925,4720685.02967047],
   [-10536276.7180158,4718585.76308674],
   [-10538355.9915844,4718592.42742511],
   [-10538362.6559228,4720678.36533211]]
  ]
}
]

and the output is 9002, feet or 9035, miles. The ring was drawn in Silverlight and should be close to a square mile. The results are not close to a square mile.

9002:
Areas: 46759714.5770107
Lengths: 27352.8925285099

9035:
Areas: 1.67726725846316
Lengths: 5.1804617088494

Just as observation here, the lengths reported for a square mile should be close to 4, because it has 4 sides, this lengths value adds the last set of coordinates to the length, the last set is just the first coords, just used to close the polygon. Is this correct? If I create a Path like this using the same coords, not including the last one:
[
{
  "paths" : [
   [[-10538362.6559228,4720678.36533211],
   [-10536290.0466925,4720685.02967047],
   [-10536276.7180158,4718585.76308674],
   [-10538355.9915844,4718592.42742511]]
  ]
}
]
I get this value:

Lengths: 3.88431596189669

Close to 4, which is expected.

Am I doing something incorrectly? Any help is appreciated.

-bert

Outcomes