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 corresponding to the union of two geometries.
Input A and B geometries
Input A and B geometries
Union result
Union result
Remark: If the type of the geometries passed as parameters is known, then the type of the result is also pre-determined. Most geospatial applications don't support columns with heterogeneous data (points, lines or polygons within a single item of type "Geometry"), so there's generally no need to check the type of geometry returned by the function.

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)
// 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, 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)
// Add last point (same as first)
Linestring2DAddPoint(o2DPolygon_2.Outline, 3.00, 1.00)
// Corrects the new geometry
o2DPolygon_2 = GeometryCorrect(o2DPolygon_2)

// Get union as a MultiPolygon2D
// The union of two polygons is always a MultiPolygon
symmetric_difference is MultiPolygon2D = GeometryUnion(o2DPolygon_1, o2DPolygon_2)
Syntax
<Result> = GeometryUnion(<Geometry A> , <Geometry B>)
<Result>: Variable of type MultiPoint2D, MultiPointGeo, MultiLinestring2D, MultiLinestringGeo, MultiPolygon2D or MultiPolygonGeo
Union result. This geometry contains a collection of geometries of a given type: If the union between two geometries consists of a single element, the collection will contain a single element.
If the union is empty (e.g., union of two empty multipolygons), the collection will be empty.
If the result of the union is disjoint (e.g. union of two disjoint geometries), the collection will contain several elements.
<Geometry A>: Variable containing spatial data
First geometry taken into account for the union. This geometry can correspond to one of the following variable types:
<Geometry B>: Variable containing spatial data
Second geometry taken into account for the union. This geometry can correspond to one of the following variable types:
Business / UI classification: Business Logic
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/29/2024

Send a report | Local help