ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Managing data
  • Properties specific to Linestring2D variables
  • Functions that use the Linestring2D type
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Linestring2D type is used to define all the advanced characteristics of a linestring defined with 2D coordinates. You can define and change the characteristics of this 2D linestring using different WLanguage properties.
Characteristics of a 2D linestring:
A 2D linestring is a set of contiguous segments represented on a Cartesian plane. It is defined by a sequence of points. In mathematics, this is referred to as "polygonal chain".
If the start and end points of a linestring are the same, the linestring is "closed".
If the linestring does not self-intersect, the linestring is "simple".
A simple and closed linestring is referred to as a "LinearRing".
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
MyLine is Linestring2D

// Add points to linestring
// 1. Standard syntax 
Linestring2DAddPoint(MyLine, 31, 21)
// 2. Prefix syntax
MyPoint is Point2D
MyPoint.X = 31
MyPoint.Y = 21 
MyLine.Point.Add(MyPoint)
MyLine is Linestring2D

// Add points to linestring
// 1. Standard syntax
Linestring2DAddPoint(MyLine, 32, 22)
Linestring2DAddPoint(MyLine, 134, 12)

// 2. Prefix syntax
MyLine.AddPoint(32, 22)
MyLine.AddPoint(134, 12)
Properties

Properties specific to Linestring2D variables

The following properties can be used to manipulate a 2D linestring:
Property nameType usedEffect
PointArray of Point2DLinestring points.
TypeInteger constantType of the current geometry. For a linestring defined with 2D coordinates, corresponds to the gtLinestring2D constant.
Remark: Until version 2024 Update 2, this constant was named stLinestring2D.
This property is available in read-only.
Remarks

Functions that use the Linestring2D type

The following functions use Linestring2D variables:
GeometryAreaCalculates the area of a given geometry.
GeometryContainDetermines if geometry A contains geometry B.
GeometryConvexHullCalculates the convex hull of the specified geometry.
GeometryCorrectReturns a corrected version of the specified geometry.
GeometryCoverDetermines if geometry A covers geometry B.
GeometryCoveredByDetermines if every point of geometry A lies inside or on the boundary of geometry B.
GeometryCrossCompares two geometries and determines if their intersection spatially crosses.
GeometryDifferenceReturns a geometry representing the difference between two geometries.
GeometryDisjointDetermines whether two geometries are disjoint, i.e. whether their intersection is empty.
GeometryDistanceCalculates the distance between two geometries.
GeometryEqualDetermines whether two geometries are spatially equal, i.e. whether the first geometry is included in the second, and vice versa.
GeometryIntersectChecks whether two geometries have a non-empty intersection.
GeometryIntersectionReturns a geometry representing the intersection of two geometries.
GeometryIsValidChecks whether the specified geometry is valid according to the OGC rules.
GeometryLengthCalculates the length of a given geometry.
GeometryOverlapDetermines whether two geometries overlap.
GeometryPerimeterCalculates the perimeter of a given geometry (polygon or multipolygon).
GeometrySerializeDSVSerializes a geometry using the specified DSV format.
GeometrySerializeWKTSerializes a geometry using the Well-Known Text (WKT) format.
GeometrySymmetricDifferenceCalculates the symmetric difference between two geometries.
GeometryTouchDetermines whether two geometries touch.
GeometryUnionReturns a geometry corresponding to the union of two geometries.
GeometryWithinDetermines whether geometry A is completely within geometry B (i.e., geometry B completely contains geometry A).
Linestring2DAddPointAdds a new point to a 2D linestring.
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/27/2024

Send a report | Local help