ssb-sgis 1.1.2__py3-none-any.whl → 1.1.3__py3-none-any.whl

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.
@@ -695,8 +695,8 @@ def _read_partitioned_parquet(
695
695
  if mask is not None and not intersects(file, mask):
696
696
  return
697
697
 
698
+ # get instead of pop, then copy kwargs (because mutable)
698
699
  schema = kwargs.get("schema", pq.read_schema(file))
699
- # copy kwargs because mutable
700
700
  new_kwargs = {
701
701
  key: value for key, value in kwargs.items() if key != "schema"
702
702
  }
sgis/maps/wms.py CHANGED
@@ -15,6 +15,8 @@ from ..geopandas_tools.conversion import to_shapely
15
15
 
16
16
  JSON_PATH = Path(__file__).parent / "norge_i_bilder.json"
17
17
 
18
+ JSON_YEARS = [str(year) for year in range(1999, 2025)]
19
+
18
20
  DEFAULT_YEARS: tuple[str] = tuple(
19
21
  str(year)
20
22
  for year in range(
@@ -168,7 +170,7 @@ class NorgeIBilderWms(WmsLoader):
168
170
 
169
171
  self.years = [str(int(year)) for year in self.years]
170
172
 
171
- if all(year in DEFAULT_YEARS for year in self.years):
173
+ if all(year in JSON_YEARS for year in self.years):
172
174
  try:
173
175
  with open(JSON_PATH, encoding="utf-8") as file:
174
176
  self.tiles = json.load(file)
@@ -185,3 +187,7 @@ class NorgeIBilderWms(WmsLoader):
185
187
  ]
186
188
  else:
187
189
  self.tiles = None
190
+
191
+ def __repr__(self) -> str:
192
+ """Print representation."""
193
+ return f"{self.__class__.__name__}({len(self.tiles or [])})"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ssb-sgis
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: GIS functions used at Statistics Norway.
5
5
  Home-page: https://github.com/statisticsnorway/ssb-sgis
6
6
  License: MIT
@@ -21,7 +21,7 @@ sgis/geopandas_tools/sfilter.py,sha256=SLcMYprQwnY5DNo0R7TGXk4m6u26H8o4PRn-RPhme
21
21
  sgis/helpers.py,sha256=Ah4vFPQwnAFkZRALLBiR5iXwRMrx89kNTx5-5NTHsY8,9475
22
22
  sgis/io/__init__.py,sha256=uyBr20YDqB2bQttrd5q1JuGOvX32A-MSvS7Wmw5f5qg,177
23
23
  sgis/io/_is_dapla.py,sha256=wmfkSe98IrLhUg3dtXZusV6OVC8VlY1kbc5EQDf3P-Q,358
24
- sgis/io/dapla_functions.py,sha256=jHE67ADF1Fu3WG1-4x696r6f4pSUG3f9JaJu_c2Aqjs,29360
24
+ sgis/io/dapla_functions.py,sha256=43EouGCZvSYhh_5oGT2XnVCV6mJ7L4XOelcRJPRRXr4,29387
25
25
  sgis/io/opener.py,sha256=HWO3G1NB6bpXKM94JadCD513vjat1o1TFjWGWzyVasg,898
26
26
  sgis/io/read_parquet.py,sha256=FvZYv1rLkUlrSaUY6QW6E1yntmntTeQuZ9ZRgCDO4IM,3776
27
27
  sgis/maps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -34,7 +34,7 @@ sgis/maps/maps.py,sha256=gxu0rgcVygjudRtM1dVRmsUMilMUIg3vG-UgvASM91E,23072
34
34
  sgis/maps/norge_i_bilder.json,sha256=W_mFfte3DxugWbEudZ5fadZ2JeFYb0hyab2Quf4oJME,481311
35
35
  sgis/maps/thematicmap.py,sha256=w6q4_gIr8BubQgsPJkc6WXk-tmplDLGcKyjphhFp7ng,21873
36
36
  sgis/maps/tilesources.py,sha256=F4mFHxPwkiPJdVKzNkScTX6xbJAMIUtlTq4mQ83oguw,1746
37
- sgis/maps/wms.py,sha256=XHlCszR0raPbmUc2wYpQ_XRHnSJ6c1ic3w2dNnfMRm4,6252
37
+ sgis/maps/wms.py,sha256=Sely3Pt-cym9kRlrK0JTjtMe21kTxWY6ucD2dAoWHI0,6442
38
38
  sgis/networkanalysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  sgis/networkanalysis/_get_route.py,sha256=9I3t9pnccUPr4mozy3TJCOpGCCf3UOIojmsbifubZbA,6368
40
40
  sgis/networkanalysis/_od_cost_matrix.py,sha256=zkyPX7ObT996ahaFJ2oI0D0SqQWbWyfy_qLtXwValPg,3434
@@ -58,7 +58,7 @@ sgis/raster/indices.py,sha256=-J1HYmnT240iozvgagvyis6K0_GHZHRuUrPOgyoeIrY,223
58
58
  sgis/raster/regex.py,sha256=kYhVpRYzoXutx1dSYmqMoselWXww7MMEsTPmLZwHjbM,3759
59
59
  sgis/raster/sentinel_config.py,sha256=nySDqn2R8M6W8jguoBeSAK_zzbAsqmaI59i32446FwY,1268
60
60
  sgis/raster/zonal.py,sha256=D4Gyptw-yOLTCO41peIuYbY-DANsJCG19xXDlf1QAz4,2299
61
- ssb_sgis-1.1.2.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
62
- ssb_sgis-1.1.2.dist-info/METADATA,sha256=SkKkxMGWK9n2CGvI0D4FQ4Hb4UKV9TAba38iTlDiQVI,11740
63
- ssb_sgis-1.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
64
- ssb_sgis-1.1.2.dist-info/RECORD,,
61
+ ssb_sgis-1.1.3.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
62
+ ssb_sgis-1.1.3.dist-info/METADATA,sha256=iq3uvfa6qzFdPfcclY0M07-lZsypkVkWiKKudrTqFx0,11740
63
+ ssb_sgis-1.1.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
64
+ ssb_sgis-1.1.3.dist-info/RECORD,,