mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
Fix exception with older shapely versions
This commit is contained in:
parent
95dae189f5
commit
8a61127bd0
@ -633,8 +633,9 @@ except ModuleNotFoundError:
|
||||
|
||||
try:
|
||||
import shapely as _shapely
|
||||
import shapely.geometry as _sg
|
||||
|
||||
def _geometry_as_shapely(self) -> _shapely.geometry.base.BaseGeometry:
|
||||
def _geometry_as_shapely(self) -> _sg.base.BaseGeometry:
|
||||
wkb_qbytearray = self.asWkb() # Get the geometry in WKB format (QByteArray)
|
||||
shapely_geom = _shapely.from_wkb(wkb_qbytearray.data())
|
||||
|
||||
|
@ -643,8 +643,9 @@ except ModuleNotFoundError:
|
||||
|
||||
try:
|
||||
import shapely as _shapely
|
||||
import shapely.geometry as _sg
|
||||
|
||||
def _geometry_as_shapely(self) -> _shapely.geometry.base.BaseGeometry:
|
||||
def _geometry_as_shapely(self) -> _sg.base.BaseGeometry:
|
||||
wkb_qbytearray = self.asWkb() # Get the geometry in WKB format (QByteArray)
|
||||
shapely_geom = _shapely.from_wkb(wkb_qbytearray.data())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user