We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2b3727 commit 342e028Copy full SHA for 342e028
1 file changed
shapely/validation.py
@@ -1,6 +1,7 @@
1
# TODO: allow for implementations using other than GEOS
2
-from shapely.geometry.base import geom_factory
3
-from shapely.geos import lgeos
+
+import pygeos
4
5
6
__all__ = ['explain_validity', 'make_valid']
7
@@ -23,7 +24,7 @@ def explain_validity(ob):
23
24
A string describing the reason the geometry is invalid.
25
26
"""
- return lgeos.GEOSisValidReason(ob._geom)
27
+ return pygeos.is_valid_reason(ob)
28
29
30
def make_valid(ob):
@@ -52,4 +53,4 @@ def make_valid(ob):
52
53
54
if ob.is_valid:
55
return ob
- return geom_factory(lgeos.GEOSMakeValid(ob._geom))
56
+ return pygeos.make_valid(ob)
0 commit comments