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 intersection of two geometries.
Input A and B geometries
Input A and B geometries
Intersection result
Intersection result
Remarks:
  • 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.
  • To determine whether two geometries intersect, use GeometryIntersect.
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)
o2DPolygon_2 = GeometryCorrect(o2DPolygon_2)

// Retrieve intersection as a MultiPolygon2D object
// The intersection of two polygons is always a MultiPolygon
symmetric_difference is MultiPolygon2D = GeometryIntersection(o2DPolygon_1, o2DPolygon_2)
Syntax
<Result> = GeometryIntersection(<Geometry A> , <Geometry B>)
<Result>: Variable of type MultiPoint2D, MultiPointGeo, MultiLinestring2D, MultiLinestringGeo, MultiPolygon2D or MultiPolygonGeo
Intersection result. This geometry contains a collection of geometries of a given type: If the intersection between two geometries consists of a single element, the collection will contain a single element.
If the intersection is empty (for example, by calculating the difference between a geometry and itself), the collection is empty.
If the result of the intersection is disjoint (e.g. the intersection of two "U"-shaped polygons), the collection contains several elements.
<Geometry A>: Variable containing spatial data
First input geometry used for the intersection. This geometry can correspond to one of the following variable types:
<Geometry B>: Variable containing spatial data
Second input geometry used for the intersection. 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/21/2024

Send a report | Local help