Error when loading gebco bathymetry
Hi @matt_s ,
Trying to use the new gebco load_bathymetry function, I got the following (minor) error:
>>> from kadlu.geospatial.data_sources.gebco import Gebco
>>> x = Gebco.load_bathymetry(south=43.2, north=44.2, west=-60.0, east=-59.0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: load_bathymetry() missing 1 required positional argument: 'self'
>>> gb = Gebco()
>>> x = gb.load_bathymetry(south=43.2, north=44.2, west=-60.0, east=-59.0)
2020-09-10 10:52:20 downloading and decompressing gebco bathymetry (geotiff ~8GB)...
gebco_2020_geotiff.zip: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3730631664/3730631664 [36:23<00:00, 1708750.29it/s]
Archive: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_geotiff.zip
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/GEBCO_2020_Grid.pdf
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_n0.0_s-90.0_w0.0_e90.0.tif
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_n0.0_s-90.0_w-180.0_e-90.0.tif
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_n0.0_s-90.0_w-90.0_e0.0.tif
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_n0.0_s-90.0_w90.0_e180.0.tif
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_n90.0_s0.0_w0.0_e90.0.tif
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_n90.0_s0.0_w-180.0_e-90.0.tif
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_n90.0_s0.0_w-90.0_e0.0.tif
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/gebco_2020_n90.0_s0.0_w90.0_e180.0.tif
inflating: /media/oliskir/LocalStorage/data/geospatial/kadlu_data/GEBCO_Grid_terms_of_use.pdf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/oliskir/src/meridian/kadlu/kadlu/geospatial/data_sources/gebco.py", line 81, in load_bathymetry
self.fetch_bathymetry(south=south, north=north, west=west, east=east)
File "/home/oliskir/src/meridian/kadlu/kadlu/geospatial/data_sources/gebco.py", line 59, in fetch_bathymetry
fetchmap(callback=self.callback, fname=fname)
File "/home/oliskir/src/meridian/kadlu/kadlu/spinbin.py", line 86, in __call__
return list(self.__call_generator__(callback=callback, **passkwargs))
File "/home/oliskir/src/meridian/kadlu/kadlu/spinbin.py", line 92, in __call_generator__
if not self.serialized(kwargs, seed): self.insert_hash(kwargs, seed, callback(**passkwargs, **kwargs))
File "/home/oliskir/src/meridian/kadlu/kadlu/geospatial/data_sources/gebco.py", line 65, in callback
logging.info(f'GEBCO BATHYMETRY scanning {fname} for data in region {json.dumps(dict(south=south, west=west, north=north, east=east), default=str)}')
NameError: name 'json' is not defined
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information