Maptitude GISDK Help |
Gets the coordinates that describe the location of a line feature.
pts = GetLine(integer id)
Argument |
Contents |
id |
The ID of the line feature |
An array of coordinates in their topological order. The from node is the first coordinate and the to node is the last coordinate in the array.
The current layer must be a line layer.
Some types of layers, such as Esri Shapefiles, can have lines with multiple parts. GetLine() indicates this with the NonUnique error. Use GetMultiLine() to get the coordinates for lines from layers of these types.
pts = GetLine(123)
dist = 0
for i = 1 to pts.length - 1 do
dist = dist + GetDistance(pts[i], pts[i + 1])
end
ShowMessage("The length of the line is " + String(dist))
Error Type |
Meaning |
NotFound |
No line feature exists with the given ID |
NonUnique |
More than one line feature exists with the given ID |
Function |
Summary |
Get the coordinates that describe an area feature |
|
Returns the length of the feature in current map units |
|
Gets the coordinates that describe the location of a multiple part line feature |
|
Gets the location of the point feature with the specified ID |
|
Changes the coordinates of a line feature in a standard geographic file |
©2025 Caliper Corporation | www.caliper.com |