ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Spatial data management
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Determines whether two geometries touch.
Two geometries touch:
  • if the boundaries of the two geometries intersect, but the interiors do NOT intersect.
  • if they have a point or segment of their boundaries in common.
Examples of touching geometries:
Geometries with a common point
Geometries with a common point
Geometries with a common segment
Geometries with a common segment
Examples of non-touching geometries:
Disjoint geometries
Disjoint geometries
Geometries with intersecting interiors
Geometries with intersecting interiors

Example
// Two polygons with a point in common
o2DPolygon_1 is Polygon2D
Linestring2DAddPoint(o2DPolygon_1.Outline, -2.00, 2.00)
Linestring2DAddPoint(o2DPolygon_1.Outline, 0.00, 2.00)
Linestring2DAddPoint(o2DPolygon_1.Outline, 0.00, -2.00)
Linestring2DAddPoint(o2DPolygon_1.Outline, -2.00, -2.00)
// Add last point (same as first)
Linestring2DAddPoint(o2DPolygon_1.Outline, -2.00, 2.00)
// Corrects the new geometry
o2DPolygon_1 = GeometryCorrect(o2DPolygon_1)

o2DPolygon_2 is Polygon2D
Linestring2DAddPoint(o2DPolygon_2.Outline, 2.00, 2.00)
Linestring2DAddPoint(o2DPolygon_2.Outline, 2.00, -1.00)
Linestring2DAddPoint(o2DPolygon_2.Outline, 0.00, 0.00)
// Add last point (same as first)
Linestring2DAddPoint(o2DPolygon_2.Outline, 2.00, 2.00)
// Corrects the new geometry
o2DPolygon_2 = GeometryCorrect(o2DPolygon_2)

Trace(GeometryTouch(o2DPolygon_1, o2DPolygon_2))
Syntax
<Result> = GeometryTouch(<Geometry A> , <Geometry B>)
<Result>: Boolean
  • True if the two geometries touch,
  • False otherwise.
If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo with the errMessage constant.
<Geometry A>: Variable containing spatial data
First geometry used. This geometry can correspond to one of the following variable types:
<Geometry B>: Variable containing spatial data
Second geometry used. This geometry can correspond to one of the following variable types:
Business / UI classification: Business Logic
Component: wd300hf.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/26/2024

Send a report | Local help