The area of feature don't equal the value Shape.Area ?

2749
11
02-17-2014 12:04 AM
TaiBui
by
Occasional Contributor II
Hi everyone,

I used this statement to get the area value of polygon feature:

 while (pFeature != null)
     {
               
                IGeometry shapeCopy = pFeature.ShapeCopy;                                

                IArea area = pFeature.Shape as IArea;
                double value = area.Area; // Result is: 110102.807...
                  
       
                // ....
                pFeature = pFeatureCursor.NextFeature();
      }


But when showing the identify: The Shape.Area is: 20737.12 (not equal 110102.807). Please see the image:

[ATTACH=CONFIG]31505[/ATTACH]

Do you know what's wrong with it ?

Thanks and regards,

Tai
0 Kudos
11 Replies
AlexanderGray
Occasional Contributor III
0.07 acres off sound like a rounding error.  I don't think it is the same problem.
Shape.Area is usually almost meaningless.  It is the cartesian area calculated in the coordinates of the dataset as if the the world was flat.   If your dataset's spatial reference is not defined to start with, the shape.area is of unknown units, so potentially doubly meaningless.  Just think, what does the shape.area mean if the polygons are in geographic coordinates (latitude/longitude)?  It means pretty much nothing at all.
If your dataset is projected with non-angular units (metres, feet, etc.) then it represents the area within the tolerance of the distortion factor (scale factor) of the projection system if your projection system is appropriate for the data and area measurements.  In that case you may end up with 0.07 discrepancies due to projection distortion.
0 Kudos
isaacferrie
New Contributor
Thank you for the explanation.  The projection is set for this project and view.  I guess what I am wondering is there a script or command that would do exactly what the calculate geometry features does when working within the table.

Thank You
0 Kudos