ssb-sgis 1.1.14__tar.gz → 1.1.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/PKG-INFO +1 -1
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/pyproject.toml +1 -1
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/polygon_operations.py +8 -7
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/raster/image_collection.py +0 -7
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/LICENSE +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/README.md +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/__init__.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/conf.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/debug_config.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/exceptions.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/__init__.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/bounds.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/buffer_dissolve_explode.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/centerlines.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/cleaning.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/conversion.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/duplicates.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/general.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/geocoding.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/geometry_types.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/neighbors.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/overlay.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/point_operations.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/polygons_as_rings.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/geopandas_tools/sfilter.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/helpers.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/io/__init__.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/io/_is_dapla.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/io/dapla_functions.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/io/opener.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/io/read_parquet.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/__init__.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/examine.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/explore.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/httpserver.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/legend.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/map.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/maps.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/norge_i_bilder.json +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/thematicmap.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/tilesources.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/maps/wms.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/__init__.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/_get_route.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/_od_cost_matrix.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/_points.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/_service_area.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/closing_network_holes.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/cutting_lines.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/directednetwork.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/finding_isolated_networks.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/network.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/networkanalysis.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/networkanalysisrules.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/nodes.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/networkanalysis/traveling_salesman.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/parallel/__init__.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/parallel/parallel.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/py.typed +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/raster/__init__.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/raster/base.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/raster/indices.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/raster/regex.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/raster/sentinel_config.py +0 -0
- {ssb_sgis-1.1.14 → ssb_sgis-1.1.15}/src/sgis/raster/zonal.py +0 -0
|
@@ -205,9 +205,9 @@ def get_polygon_clusters(
|
|
|
205
205
|
|
|
206
206
|
def get_cluster_mapper(
|
|
207
207
|
gdf: GeoDataFrame | GeoSeries, predicate: str = "intersects"
|
|
208
|
-
) ->
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
) -> list[int]:
|
|
209
|
+
"""Returns a list of cluster indices corresponding to the order of the input GeoDataFrame or GeoSeries."""
|
|
210
|
+
gdf = gdf.reset_index(drop=True)
|
|
211
211
|
neighbors = get_neighbor_indices(gdf, gdf, predicate=predicate)
|
|
212
212
|
|
|
213
213
|
edges = [(source, target) for source, target in neighbors.items()]
|
|
@@ -215,11 +215,12 @@ def get_cluster_mapper(
|
|
|
215
215
|
graph = nx.Graph()
|
|
216
216
|
graph.add_edges_from(edges)
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
for
|
|
221
|
-
for
|
|
218
|
+
mapper = {
|
|
219
|
+
i: cluster_index
|
|
220
|
+
for cluster_index, component in enumerate(nx.connected_components(graph))
|
|
221
|
+
for i in component
|
|
222
222
|
}
|
|
223
|
+
return list(dict(sorted(mapper.items())).values())
|
|
223
224
|
|
|
224
225
|
|
|
225
226
|
def eliminate_by_longest(
|
|
@@ -897,9 +897,6 @@ class Band(_ImageBandBase):
|
|
|
897
897
|
if self._bounds is None:
|
|
898
898
|
raise ValueError("Must specify bounds when data is an array.")
|
|
899
899
|
if not (res is None or (callable(res) and res() is None)):
|
|
900
|
-
# if not (res is None or (callable(res) and res() is None)) and _res_as_tuple(
|
|
901
|
-
# res
|
|
902
|
-
# ) != _get_res_from_bounds(self._bounds, data.shape):
|
|
903
900
|
raise ValueError(
|
|
904
901
|
f"Cannot specify 'res' when data is an array. {res} and {_get_res_from_bounds(self._bounds, data.shape)}"
|
|
905
902
|
)
|
|
@@ -934,10 +931,6 @@ class Band(_ImageBandBase):
|
|
|
934
931
|
|
|
935
932
|
if self.metadata:
|
|
936
933
|
parent = _fix_path(str(Path(self.path).parent))
|
|
937
|
-
if self.path is not None:
|
|
938
|
-
self.metadata = {
|
|
939
|
-
key: value for key, value in self.metadata.items() if key == parent
|
|
940
|
-
}
|
|
941
934
|
for key, value in self.metadata.get(parent, {}).items():
|
|
942
935
|
if key == "bands" and self.band_id in value:
|
|
943
936
|
band_metadata = value[self.band_id]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|