ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Spatial data management
  • Properties specific to Point2D variables
  • Functions that use the Point2D type
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The Point2D type is used to define all the characteristics of a location represented on a Cartesian plane. This type of point is used to define geometric data that uses 2D coordinates.
When you manipulate geometric data, all geometries use points:
  • linestrings are made up of a series of connected points,
  • polygons are made up of linestrings: one linestring defining the exterior ring and other linestrings defining the holes, if any.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Declaring a point using 2D coordinates
p is Point2D
p.X = 3
p.Y = 12

// Display the point as a string
Trace(GeometrySerializeWKT(p))
// Displays: "POINT(3 12)"
Properties

Properties specific to Point2D variables

The following properties can be used to manipulate a variable of type Point2D:
Property nameType usedEffect
TypeInteger constantType of the current geometry. For a point defined with 2D coordinates, corresponds to the gtPoint2D constant.
Remark: Until version 2024 Update 2, this constant was named stPoint2D.
This property is available in read-only.
XRealX-coordinate of the point on the Cartesian plane.
YRealY-coordinate of the point on the Cartesian plane.
Remarks

Functions that use the Point2D type

The following functions use Point2D 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).
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/01/2024

Send a report | Local help