map2loop-2
map2loop-2 copied to clipboard
Unable to access dtm as it does not get created consistently
10%|███████▎ | 10/100 [00:07<01:05, 1.38it/s]
Done
Fetching DTM... bbox:117.04431041708905 117.62994886664823 -22.79826965843374 -22.393797034787504
Attempt: 0 1
10%|███████▎ | 10/100 [00:18<02:44, 1.83s/it]
dtm geotif saved as ../scratch/dtm/dtm.tif
Done.
---------------------------------------------------------------------------
CPLE_OpenFailedError Traceback (most recent call last)
rasterio\_base.pyx in rasterio._base.DatasetBase.__init__()
rasterio\_shim.pyx in rasterio._shim.open_dataset()
rasterio\_err.pyx in rasterio._err.exc_wrap_pointer()
CPLE_OpenFailedError: '../scratch/dtm/dtm.tif' not recognized as a supported file format.
During handling of the above exception, another exception occurred:
RasterioIOError Traceback (most recent call last)
<ipython-input-6-2bb76722df30> in <module>
26 quiet=False
27 )
---> 28 proj.run()
~\AppData\Roaming\Python\Python37\site-packages\map2loop-1.0.8-py3.7.egg\map2loop\project.py in run(self)
248 pbar.update(10)
249
--> 250 self.config.load_dtm()
251 pbar.update(10)
252
~\AppData\Roaming\Python\Python37\site-packages\map2loop-1.0.8-py3.7.egg\map2loop\config.py in load_dtm(self)
319
320 geom_rp = m2l_utils.reproject_dtm(
--> 321 self.dtm_file, self.dtm_reproj_file, self.dtm_crs, self.proj_crs)
322 self.dtm = rasterio.open(self.dtm_reproj_file)
323 if not self.quiet:
~\AppData\Roaming\Python\Python37\site-packages\map2loop-1.0.8-py3.7.egg\map2loop\m2l_utils.py in reproject_dtm(path_in, path_out, src_crs, dst_crs)
273
274 def reproject_dtm(path_in, path_out, src_crs, dst_crs):
--> 275 with rasterio.open(path_in) as src:
276 transform, width, height = calculate_default_transform(
277 src.crs, dst_crs, src.width, src.height, *src.bounds)
~\Anaconda3\envs\m2l2\lib\site-packages\rasterio\env.py in wrapper(*args, **kwds)
443
444 with env_ctor(session=session):
--> 445 return f(*args, **kwds)
446
447 return wrapper
~\Anaconda3\envs\m2l2\lib\site-packages\rasterio\__init__.py in open(fp, mode, driver, width, height, count, crs, transform, dtype, nodata, sharing, **kwargs)
217 # None.
218 if mode == 'r':
--> 219 s = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
220 elif mode == 'r+':
221 s = get_writer_for_path(path)(path, mode, driver=driver, sharing=sharing, **kwargs)
rasterio\_base.pyx in rasterio._base.DatasetBase.__init__()
RasterioIOError: '../scratch/dtm/dtm.tif' not recognized as a supported file format.