CreatePointsAlongLine function
Prototype: |
function CreatePointsAlongLine (const LineID :integer, const TargetPointLayerName :string, const NumberOfPoints :integer, const Offset_m :variant) : string; |
|
Description: |
Creates predefined number of points along selected line with equal sized gaps. |
|
Syntax: |
variable := Layer.CreatePointsAlongLine (LineID, TargetPointLayerName, NumberOfPoints, Offset_m); |
|
Part |
Description |
|
variable |
A variable declared as a string |
|
Layer |
A reference to the Field-Map line layer as defined in Field-Map Project Manager |
|
LineID |
ID of line to align new points |
|
TargetPointLayerName |
Name of the point layer to store new points (see Name function) |
|
NumberOfPoints |
Number of points to create along line |
|
Offset_m |
Offset in meters. It defines the gap without points at the beginning and the end of the line (so it should be smaller than half of the line length). If negative value is inserted, then random value from 0 to absolute value of offset is used. |
|
Return value: |
list of IDs of created points |
|
Example: // Simple script to position 4 new points along line. The first and the last one are placed in a distance of 20 % line length from the begin or the end of the line. Moreover, the distance of every pair of neighbouring points equals to 20 % of the line length. begin Line.CreatePointsAlongLine(1, Point.Name, 4, (Line['Length_m']/5)) 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
© 2024 IFER-Monitoring and Mapping Solutions