Skip to content

Commit 1d9c45e

Browse files
authored
Merge pull request #308 from statisticsnorway/map-hatches
fjerne dapla-toolbelt. Og fikse index-bug hvis 0 rader
2 parents 440f8bd + 89f6e73 commit 1d9c45e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ssb-sgis"
3-
version = "1.3.2"
3+
version = "1.3.3"
44
description = "GIS functions used at Statistics Norway."
55
authors = ["Morten Letnes <morten.letnes@ssb.no>"]
66
license = "MIT"
@@ -45,12 +45,11 @@ xyzservices = ">=2023.2.0"
4545
dask = { version = ">=2024.1.1", optional = true }
4646
xarray = { version = ">=2024.3.0", optional = true }
4747
rioxarray = { version = ">=0.15.5", optional = true }
48-
dapla-toolbelt = { version = ">=3.0.1", optional = true }
4948
gcsfs = { version = ">=2024.3.1", optional = true }
5049

5150
[tool.poetry.extras]
52-
all = ["pyogrio", "xarray", "rioxarray", "dapla-toolbelt", "gcsfs", "dask"]
53-
bucket = ["dapla-toolbelt", "gcsfs"]
51+
all = ["pyogrio", "xarray", "rioxarray", "gcsfs", "dask"]
52+
bucket = ["gcsfs"]
5453
xarray = ["xarray", "rioxarray"]
5554
test = ["xarray", "rioxarray", "dask"]
5655

src/sgis/geopandas_tools/overlay.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ def _shapely_pd_overlay(
268268
left, right = rtree_runner.run(
269269
df1.geometry.values, df2.geometry.values, predicate=predicate
270270
)
271+
left = left.astype(int)
272+
right = right.astype(int)
271273
pairs = _get_intersects_pairs(df1, df2, left, right, rsuffix)
272274
assert pairs["geometry"].notna().all(), pairs.geometry[lambda x: x.isna()]
273275
assert pairs["geom_right"].notna().all(), pairs.geom_right[lambda x: x.isna()]

src/sgis/io/dapla_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def get_bounds_series(
355355
Examples:
356356
---------
357357
>>> import sgis as sg
358-
>>> import dapla as dp
358+
>>> from gcsfs import GCSFileSystem
359359
>>> all_paths = GCSFileSystem().ls("...")
360360
361361
Get the bounds of all your file paths, indexed by path.

src/sgis/io/opener.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
from typing import Any
66

77
try:
8-
from dapla import FileClient
9-
from dapla.gcs import GCSFileSystem
8+
from gcsfs import GCSFileSystem
109
except ImportError:
1110

1211
class GCSFileSystem: # type: ignore[no-redef]
@@ -30,7 +29,7 @@ def opener(
3029
"""
3130
if is_dapla():
3231
if file_system is None:
33-
file_system = FileClient.get_gcs_file_system()
32+
file_system = GCSFileSystem()
3433
yield file_system.open(str(path), mode=mode)
3534
else:
3635
yield str(path)

0 commit comments

Comments
 (0)