Hi,
Is there a simple way to calculate the area of a polygon (m²) from one feature of a shapefile ?
Thank for your help.
Hi,
Is there a simple way to calculate the area of a polygon (m²) from one feature of a shapefile ?
Thank for your help.
Humm, I think that "GetArea" answers my question …
Dim mps As MultipolygonShape = myFeature
Dim area As Double = mps.GetArea(Meter, AreaUnit.SquareMeters)
Eric,
I think your are right, I tested your function in C#, that works well.
RectangleShape rect = new RectangleShape(-131.22, 55.05, -54.03, 16.91);
Double area = rect.GetArea(GeographyUnit.Meter, AreaUnit.SquareMeters);
Thanks for your share.
Regards,
Don
Eric,
I want to add that it is really important that you set correctly the first parameters, the Geography Unit which is the unit the shape is in. If your shape is on the map, it is the Geography unit of the map (Map1.MapUnit). From looking at your code, it seems that the Geography unit is meters, but if the Geography unit were in decimal degrees, I would invite you to look at the sample Measurements Decimal Degrees in the Code Community to be aware of some intricacies related to doing measurements in length or area in that unit. wiki.thinkgeo.com/wiki/Map_Suite_De...al_Degrees