Field-Map Scripting

4.2.5.33 MeasurePolygonArea_m2

MeasurePolygonArea_m2 function


Prototype:

function MeasurePolygonArea_m2(const ID_ :Integer) : variant;

Description:

Measure polygon area from shapefile.

Syntax:


variable := Layer.MeasurePolygonArea_m2(SearchPolygonID);



Part

Description


variable

A variable declared as a variant


Layer

A reference to a Field-Map layer as defined in Field-Map Project Manager


SearchPolygonID

An identification of a reference polygons for which area is to be found

Return value:

a numeric variant


Example:


var

area_: variant;


begin

 Polygons.First;

while not Polygons.EOF do begin

   area_:=Polygons.MeasurePolygonArea_m2(Polygons['ID']);

if area_<>NULL then begin

     Polygons.Edit;

     Polygons['Area_m2']:=RoundTo(double(area_),-3);

     Polygons.Post;

   end;

 end;  

end.


See also:

GisLayerReference; ShapeRecordCount; GetParentPolygonArea_m2; FindIntersectingPolygons; GetIntersectingPolygonAreas; FindContainedPointsOrCentroids; FindLinesIntersectingPolygon; FindClosestLine; FindPolygonContainingPoint; FindPolygonContainingPointByCoords; AddPoint; AddLine; AddPolygon; AddCentroid; AddPolygonWithCentroid; AddCircularPolygonWithCentroid; SplitMultiPolygon; DeletePoint; DeleteLine; DeletePolygon; DeletePolygonsKeepCentroidsAndAttributes; SaveShapesToBlobs; UpdateSymbolAndLabelInShapefiles; CreatePointsAlongLine; RefreshMap; RefreshMapRectangle; ZoomAndSelect; ZoomAndSelectEntity; SelectEntities; ZoomToLayerExtent; MeasureLineLength_m; MeasurePolygonArea_m2; GetLineCoordinates; GetPolygonCoordinates; GisEntityExists; GetCombinedPolygonsCoordinates; SelectLine