ssb-sgis 1.1.4__py3-none-any.whl → 1.1.5__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.
sgis/maps/wms.py CHANGED
@@ -54,6 +54,7 @@ class NorgeIBilderWms(WmsLoader):
54
54
  years: Iterable[int | str] = DEFAULT_YEARS
55
55
  contains: str | Iterable[str] | None = None
56
56
  not_contains: str | Iterable[str] | None = None
57
+ show: bool | Iterable[int] | int = False
57
58
 
58
59
  def load_tiles(self) -> None:
59
60
  """Load all Norge i bilder tiles into self.tiles."""
@@ -122,6 +123,11 @@ class NorgeIBilderWms(WmsLoader):
122
123
 
123
124
  bbox = to_shapely(bbox)
124
125
 
126
+ if isinstance(self.show, bool):
127
+ show = self.show
128
+ else:
129
+ show = False
130
+
125
131
  for tile in self.tiles:
126
132
  if not tile["bbox"] or not tile["bbox"].intersects(bbox):
127
133
  continue
@@ -150,10 +156,18 @@ class NorgeIBilderWms(WmsLoader):
150
156
  transparent=True, # Allow transparency
151
157
  version="1.3.0", # WMS version
152
158
  attr="&copy; <a href='https://www.geonorge.no/'>Geonorge</a>",
153
- show=False,
159
+ show=show,
154
160
  max_zoom=max_zoom,
155
161
  )
156
162
 
163
+ if isinstance(self.show, int):
164
+ tile = all_tiles[list(all_tiles)[self.show]]
165
+ tile.show = True
166
+ elif isinstance(self.show, Iterable):
167
+ for i in self.show:
168
+ tile = all_tiles[list(all_tiles)[i]]
169
+ tile.show = True
170
+
157
171
  return all_tiles
158
172
 
159
173
  def __post_init__(self) -> None:
@@ -0,0 +1 @@
1
+ from .parallel import chunkwise
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ssb-sgis
3
- Version: 1.1.4
3
+ Version: 1.1.5
4
4
  Summary: GIS functions used at Statistics Norway.
5
5
  Home-page: https://github.com/statisticsnorway/ssb-sgis
6
6
  License: MIT
@@ -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=Sely3Pt-cym9kRlrK0JTjtMe21kTxWY6ucD2dAoWHI0,6442
37
+ sgis/maps/wms.py,sha256=y8xJSWCqE1SZPInWKiTGdGLI015hOFrdwUyPVouU1LU,6885
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
@@ -49,6 +49,7 @@ sgis/networkanalysis/networkanalysis.py,sha256=-g7slZLFNxUZSUMvVmf7zax-9IOXz1NGC
49
49
  sgis/networkanalysis/networkanalysisrules.py,sha256=9sXigaCzvKhXFwpeVNMtOiIK3_Hzp9yDpFklmEEAPak,12956
50
50
  sgis/networkanalysis/nodes.py,sha256=atFSpqz-_uJHMrf6MC0zhrrcWIydRMFZrsaHC2xr1GU,3374
51
51
  sgis/networkanalysis/traveling_salesman.py,sha256=Jjo6bHY4KJ-eK0LycyTy0sWxZjgITs5MBllZ_G9FhTE,5655
52
+ sgis/parallel/__init__.py,sha256=fw_Fl3IJk1bKzrRBhZIoOpznJqwd09NVHJJFj2ZLeIU,32
52
53
  sgis/parallel/parallel.py,sha256=eyIXPp6nhUhLh1rwkfPLayG5hAi3i8PxmwFHxGCo-k4,39677
53
54
  sgis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
55
  sgis/raster/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -58,7 +59,7 @@ sgis/raster/indices.py,sha256=-J1HYmnT240iozvgagvyis6K0_GHZHRuUrPOgyoeIrY,223
58
59
  sgis/raster/regex.py,sha256=kYhVpRYzoXutx1dSYmqMoselWXww7MMEsTPmLZwHjbM,3759
59
60
  sgis/raster/sentinel_config.py,sha256=nySDqn2R8M6W8jguoBeSAK_zzbAsqmaI59i32446FwY,1268
60
61
  sgis/raster/zonal.py,sha256=D4Gyptw-yOLTCO41peIuYbY-DANsJCG19xXDlf1QAz4,2299
61
- ssb_sgis-1.1.4.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
62
- ssb_sgis-1.1.4.dist-info/METADATA,sha256=lPqCX4slMY8NR7PPVDLRLYdkFOstiSMvUN6NTWXX_8M,11740
63
- ssb_sgis-1.1.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
64
- ssb_sgis-1.1.4.dist-info/RECORD,,
62
+ ssb_sgis-1.1.5.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
63
+ ssb_sgis-1.1.5.dist-info/METADATA,sha256=iTcoRw0l14xY1g-XQTHnrZId08k44xJNqM53bN8ezro,11740
64
+ ssb_sgis-1.1.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
65
+ ssb_sgis-1.1.5.dist-info/RECORD,,