@@ -10,19 +10,23 @@ Enum for the orientation of a line with respect to a curve. A line can be
1010@enum LineOrientation line_cross= 1 line_hinge= 2 line_over= 3 line_out= 4
1111
1212"""
13- intersection(geom_a, geom_b, [T::Type]; target::Type, fix_multipoly = UnionIntersectingPolygons())
13+ intersection(geom_a, geom_b, [T::Type];
14+ target::Type,
15+ exact = True(),
16+ fix_multipoly = UnionIntersectingPolygons())
1417
1518Return the intersection between two geometries as a list of geometries. Return an empty list
1619if none are found. The type of the list will be constrained as much as possible given the
1720input geometries. Furthermore, the user can provide a `target` type as a keyword argument and
1821a list of target geometries found in the intersection will be returned. The user can also
19- provide a float type that they would like the points of returned geometries to be. If the
20- user is taking a intersection involving one or more multipolygons, and the multipolygon
21- might be comprised of polygons that intersect, if `fix_multipoly` is set to an
22- `IntersectingPolygons` correction (the default is `UnionIntersectingPolygons()`), then the
23- needed multipolygons will be fixed to be valid before performing the intersection to ensure
24- a correct answer. Only set `fix_multipoly` to nothing if you know that the multipolygons are
25- valid, as it will avoid unneeded computation.
22+ provide a float type that they would like the points of returned geometries to be. Set
23+ `exact = false` (or `False()`) to use the inexact predicate path instead of the default
24+ exact one. If the user is taking a intersection involving one or more multipolygons, and
25+ the multipolygon might be comprised of polygons that intersect, if `fix_multipoly` is set
26+ to an `IntersectingPolygons` correction (the default is `UnionIntersectingPolygons()`),
27+ then the needed multipolygons will be fixed to be valid before performing the intersection
28+ to ensure a correct answer. Only set `fix_multipoly` to nothing if you know that the
29+ multipolygons are valid, as it will avoid unneeded computation.
2630
2731## Example
2832
@@ -132,7 +136,7 @@ function _intersection(
132136 end
133137 polys = Vector {_get_poly_type(T)} ()
134138 for poly_b in GI. getpolygon (multipoly_b)
135- append! (polys, intersection (alg, poly_a, poly_b; target))
139+ append! (polys, intersection (alg, poly_a, poly_b; target, kwargs ... ))
136140 end
137141 return polys
138142end
@@ -165,7 +169,7 @@ function _intersection(
165169 end
166170 polys = Vector {_get_poly_type(T)} ()
167171 for poly_a in GI. getpolygon (multipoly_a)
168- append! (polys, intersection (alg, poly_a, multipoly_b; target, fix_multipoly))
172+ append! (polys, intersection (alg, poly_a, multipoly_b; target, fix_multipoly, kwargs ... ))
169173 end
170174 return polys
171175end
0 commit comments