ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2024 feature!
Help / WLanguage / Managing databases / HFSQL / 
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
Returns a geometry representing the difference between two geometries.
Example:
Input A and B geometries
Input A and B geometries
Difference
Difference
Example
o2DPolygon_1 is Polygon2D
Linestring2DAddPoint(o2DPolygon_1.Outline, 2.00, 2.00)
Linestring2DAddPoint(o2DPolygon_1.Outline, 2.00, -2.00)
Linestring2DAddPoint(o2DPolygon_1.Outline, -2.00, -2.00)
Linestring2DAddPoint(o2DPolygon_1.Outline, -2.00, 2.00)
// The last point of the polygon is the same as the 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, 3.00, 1.00)
Linestring2DAddPoint(o2DPolygon_2.Outline, 3.00, -1.00)
Linestring2DAddPoint(o2DPolygon_2.Outline, 1.00, -1.00)
Linestring2DAddPoint(o2DPolygon_2.Outline, 1.00, 1.00)
// The last point of the polygon is the same as the first
Linestring2DAddPoint(o2DPolygon_2.Outline, 3.00, 1.00)
// Corrects the new geometry
o2DPolygon_2 = GeometryCorrect(o2DPolygon_2)

// The difference is a 2D polygon
// The difference between two polygons is always a MultiPolygon
Difference is MultiPolygon2D = GeometryDifference(o2DPolygon_1, o2DPolygon_2)
Syntax
<Result> = GeometryDifference(<Geometry A> , <Geometry B>)
<Result>: Variable of type MultiPoint2D, MultiPointGeo, MultiLinestring2D, MultiLinestringGeo, MultiPolygon2D or MultiPolygonGeo
Difference. This geometry contains a collection of geometries of a given type: If the difference between two geometries consists of a single element, the collection will contain a single element.
If the difference is empty (e.g., difference between identical geometries), the collection will be empty.
If the result of the difference is disjoint (e.g. by splitting a polygon into two), the collection will contain several elements.
<Geometry A>: Variable containing spatial data
Geometry against which geometry B will be compared. This geometry can correspond to one of the following variable types:
<Geometry B>: Variable containing spatial data
Geometry to be compared against geometry A. This geometry can correspond to one of the following variable types:
Business / UI classification: Business Logic
Component: wd290hf.dll
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