Skip to content

Commit

Permalink
fromWkb is not static
Browse files Browse the repository at this point in the history
  • Loading branch information
cnheider committed Sep 15, 2024
1 parent c0a5f8f commit 29e941e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion jord/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__project__ = "Jord"
__author__ = "Christian Heider Lindbjerg"
__version__ = "0.7.5"
__version__ = "0.7.6"
__doc__ = r"""
.. module:: jord
:platform: Unix, Windows
Expand Down
12 changes: 6 additions & 6 deletions jord/qlive_utilities/procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


@passes_kws_to(add_qgis_single_feature_layer)
def add_wkb(qgis_instance_handle: Any, wkb: str, *args, **kwargs) -> List:
def add_wkb(qgis_instance_handle: Any, wkb: bytes, *args, **kwargs) -> List:
"""
:param qgis_instance_handle:
Expand All @@ -69,13 +69,13 @@ def add_wkb(qgis_instance_handle: Any, wkb: str, *args, **kwargs) -> List:
from qgis.core import QgsGeometry

return add_qgis_single_feature_layer(
qgis_instance_handle, QgsGeometry.fromWkb(wkb), *args, **kwargs
qgis_instance_handle, QgsGeometry().fromWkb(wkb), *args, **kwargs
)


@passes_kws_to(add_wkb)
def add_wkbs(
qgis_instance_handle: Any, wkbs: Mapping[str, str], *args, **kwargs
qgis_instance_handle: Any, wkbs: Mapping[str, bytes], *args, **kwargs
) -> List:
"""
Expand All @@ -94,17 +94,17 @@ def add_wkbs(

@passes_kws_to(add_qgis_multi_feature_layer)
def add_wkb_layer(
qgis_instance_handle: Any, wkbs: Iterable[str], *args, **kwargs
qgis_instance_handle: Any, wkbs: Iterable[bytes], *args, **kwargs
) -> List:
# noinspection PyUnresolvedReferences
from qgis.core import QgsGeometry

if isinstance(wkbs, str):
if isinstance(wkbs, bytes):
wkbs = [wkbs]

return add_qgis_multi_feature_layer(
qgis_instance_handle,
[QgsGeometry.fromWkb(wkb) for wkb in wkbs],
[QgsGeometry().fromWkb(wkb) for wkb in wkbs],
*args,
**kwargs,
)
Expand Down

0 comments on commit 29e941e

Please sign in to comment.