NVE / actinia_modules_nve

Repository to collect actinia modules / endpoints for use at NVE
GNU General Public License v3.0
2 stars 1 forks source link

i.sentinel1.pyrosargeocode: PosixPath Object in DEM path #34

Closed griembauer closed 8 months ago

griembauer commented 8 months ago

Running

i.sentinel1.pyrosargeocode -fndm input=/data/s1_input/S1A_IW_GRDH_1SDV_20230807T181458_20230807T181523_049773_05FC30_73BF.SAFE.zip output_directory=/data/s1_output aoi=/data/aoi_small/aoi_small.geojson elevation=ireland_dem_native_external polarizations=VV,VH

yields

WARNING: Cells NS- and EW-resolution in raster map
         <ireland_dem_native_external> differ. Using NS-resolution.
Start geocoding scene
S1A_IW_GRDH_1SDV_20230807T181458_20230807T181523_049773_05FC30_73BF.SAFE.zip
ERROR: Geocoding failed with the following error: raster input must be of
       type str, list or gdal.Dataset; is: PosixPath
       Please check the log files

This is caused by the value of externalDEMFile in the geocode_kwargs dict:

(Pdb) geocode_kwargs["externalDEMFile"]
PosixPath('/data/dem/ireland_dem_native_int_utm29n.tif')

which comes from the `Path(... calls in def get_raster_gdalpath(map_name, check_linked=True):

Manually changing this to

geocode_kwargs["externalDEMFile"]='/data/dem/ireland_dem_native_int_utm29n.tif'

solved the issue.

(Running on Alpine 3.18 with Python 3.11)

ninsbl commented 8 months ago

Fixed in #36