Field-Map Scripting

4.2.5.16 AddPolygonWithCentroid

AddPolygonWithCentroid function


Prototype:

function AddPolygonWithCentroid (Polygon_ : TPolygonWrapper; const CenterX_m, CenterY_m, ID : variant) : boolean;

Description:

Adds a polygon with centroid to a specific layer and for the first form of syntax listed below returns 1 if the polygon with centroid was successfully created and 0 if not.

Syntax (1):

variable := Layer.AddPolygonWithCentroid (Polygon_, CenterX, CenterY, ID);

Syntax (2):

Layer.AddPolygonWithCentroid (Polygon_, CenterX, CenterY, ID);


Part

Description


variable

Variable declared as boolean


Layer

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


Polygon_

defining the topology of polygon (see Example).   bad hyperlink


CenterX

X-coordinate of centroid


CenterY

Y-coordinate of centroid


ID

ID of newly formed polygon with centroid

Return value:

True/false (for syntax 1)



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