MAJA icon indicating copy to clipboard operation
MAJA copied to clipboard

error with DTMCreation.py von ubuntu 18.04.2 LTS

Open pobsteta opened this issue 5 years ago • 5 comments

when i run DTMCreation with Avignon example, i have error : gdalwarp: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory Traceback (most recent call last): File "DTMCreation.py", line 326, in creator.run(args.out, args.tempout) File "DTMCreation.py", line 286, in run water_zipped = self.WaterZipped) File "/home/pascal/Start-MAJA/prepare_dtm/../prepare_dtm/tuilage_mnt_eau_S2.py", line 232, in run mnt_90m.decoupe(fic_mnt_in) File "/home/pascal/Start-MAJA/prepare_dtm/../prepare_dtm/lib_mnt.py", line 325, in decoupe (nblig, nbcol, type_donnee, endian) = lire_entete_mnt(fic_hdr_mnt) File "/home/pascal/Start-MAJA/prepare_dtm/../prepare_dtm/lib_mnt.py", line 193, in lire_entete_mnt with open(fic_hdr, 'r') as f: IOError: [Errno 2] No such file or directory: '/tmp/31TFJyuadfb/tmpg1573N_90m.hdr'

pobsteta avatar Jul 02 '19 15:07 pobsteta

Hi, is there a /tmp on your system ? Olivier

olivierhagolle avatar Jul 02 '19 15:07 olivierhagolle

Hi, bonjour,

Yes, there is. I am on ubuntu 18.04.2. Oui je suis sur ubuntu 18.04.2.

pobsteta avatar Jul 03 '19 06:07 pobsteta

Could you please provide the command line you used, I will try to reproduce it Merci Olivier

olivierhagolle avatar Jul 03 '19 12:07 olivierhagolle

pascal@obstetar:~/Start-MAJA/prepare_dtm$ python DTMCreation.py -i ~/zmaja/L1C_DATA/Avignon/S2A_MSIL1C_20170103T104432_N0204_R008_T31TFJ_20170103T104428.SAFE -s ~/zmaja/SRTM/ -w ~/zmaja/SWBD/ -o ~/Start-MAJA/DTM/29RPQ Found SRTM zip-archives... Found Water zip-archives... 31TFJ UTM31N 32631 109800 109800 600000 4900020 Working directory: /tmp/31TFJOulpET ('/media/pascal/orange/zmaja/SRTM/', '/tmp/31TFJOulpET', '/media/pascal/orange/zmaja/SWBD/', '/tmp/31TFJOulpET') [37, 4] [38, 4] ((4.252480872217708, 44.2465509344875, 0.0), (5.583808279570166, 43.23560095969714, 0.0)) ([37, 4], [38, 4]) ['srtm_37_04.tif', 'srtm_38_04.tif'] ((4.252480872217708, 44.2465509344875, 0.0), (5.583808279570166, 43.23560095969714, 0.0)) ([4, 44], [5, 43]) ('longitudes', 4, 5) ('latitudes', 43, 44) ('center coordinates', [[4.5, 43.5], [4.5, 44.5], [5.5, 43.5], [5.5, 44.5]]) ['e004n43', 'e004n44', 'e005n43', 'e005n44'] /tmp/31TFJOulpET ('liste_fic_mnt', ['srtm_37_04.tif', 'srtm_38_04.tif']) Archive: /media/pascal/orange/zmaja/SWBD/e004n43e.zip inflating: /tmp/31TFJOulpET/tmpCUGNC4/e004n43e.shp
inflating: /tmp/31TFJOulpET/tmpCUGNC4/e004n43e.dbf
inflating: /tmp/31TFJOulpET/tmpCUGNC4/e004n43e.shx
Archive: /media/pascal/orange/zmaja/SWBD/e004n44e.zip inflating: /tmp/31TFJOulpET/tmpCUGNC4/e004n44e.shp
inflating: /tmp/31TFJOulpET/tmpCUGNC4/e004n44e.dbf
inflating: /tmp/31TFJOulpET/tmpCUGNC4/e004n44e.shx
Archive: /media/pascal/orange/zmaja/SWBD/e005n43e.zip inflating: /tmp/31TFJOulpET/tmpCUGNC4/e005n43e.shp
inflating: /tmp/31TFJOulpET/tmpCUGNC4/e005n43e.dbf
inflating: /tmp/31TFJOulpET/tmpCUGNC4/e005n43e.shx
Archive: /media/pascal/orange/zmaja/SWBD/e005n44e.zip inflating: /tmp/31TFJOulpET/tmpCUGNC4/e005n44e.shp
inflating: /tmp/31TFJOulpET/tmpCUGNC4/e005n44e.dbf
inflating: /tmp/31TFJOulpET/tmpCUGNC4/e005n44e.shx
FIC: srtm_37_04.tif (<type 'str'>, <type 'str'>) /media/pascal/orange/zmaja/SRTM//srtm_37_04.tif Archive: /media/pascal/orange/zmaja/SRTM//srtm_37_04.zip inflating: /tmp/31TFJOulpET/tmpCUGNC4/readme.txt
inflating: /tmp/31TFJOulpET/tmpCUGNC4/srtm_37_04.hdr
inflating: /tmp/31TFJOulpET/tmpCUGNC4/srtm_37_04.tfw
inflating: /tmp/31TFJOulpET/tmpCUGNC4/srtm_37_04.tif
FIC: srtm_38_04.tif (<type 'str'>, <type 'str'>) /media/pascal/orange/zmaja/SRTM//srtm_38_04.tif Archive: /media/pascal/orange/zmaja/SRTM//srtm_38_04.zip inflating: /tmp/31TFJOulpET/tmpCUGNC4/readme.txt
inflating: /tmp/31TFJOulpET/tmpCUGNC4/srtm_38_04.hdr
inflating: /tmp/31TFJOulpET/tmpCUGNC4/srtm_38_04.tfw
inflating: /tmp/31TFJOulpET/tmpCUGNC4/srtm_38_04.tif
gdal_merge.py -o /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9.tif /tmp/31TFJOulpET/tmpCUGNC4/srtm_37_04.tif /tmp/31TFJOulpET/tmpCUGNC4/srtm_38_04.tif 0...10...20...30...40...50...60...70...80...90...100 - done. gdalwarp -r cubic -srcnodata -32767 -dstnodata 0 /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9.tif /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9nodata0.tif

gdalwarp: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory e004n43 ('#############Fichier eau :', '/tmp/31TFJOulpET/tmpCUGNC4/e004n43e.shp') gdal_rasterize -burn 1 -l e004n43e /tmp/31TFJOulpET/tmpCUGNC4/e004n43e.shp /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9_tmp.tif gdal_rasterize: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory e004n44 ('#############Fichier eau :', '/tmp/31TFJOulpET/tmpCUGNC4/e004n44e.shp') gdal_rasterize -burn 1 -l e004n44e /tmp/31TFJOulpET/tmpCUGNC4/e004n44e.shp /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9_tmp.tif gdal_rasterize: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory e005n43 ('#############Fichier eau :', '/tmp/31TFJOulpET/tmpCUGNC4/e005n43e.shp') gdal_rasterize -burn 1 -l e005n43e /tmp/31TFJOulpET/tmpCUGNC4/e005n43e.shp /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9_tmp.tif gdal_rasterize: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory e005n44 ('#############Fichier eau :', '/tmp/31TFJOulpET/tmpCUGNC4/e005n44e.shp') gdal_rasterize -burn 1 -l e005n44e /tmp/31TFJOulpET/tmpCUGNC4/e005n44e.shp /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9_tmp.tif gdal_rasterize: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory ('############', '/tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9nodata0.tif') ('nom de la tuile', '31TFJ', 0, 0) MNT Reps: /tmp/31TFJOulpET /media/pascal/orange/zmaja/SRTM/ /tmp/31TFJOulpET/tmpCUGNC4 ############### c'est parti ###decoupage 90m gdalwarp -overwrite -r cubic -srcnodata -32768 -dstnodata 0 -of ENVI -tr 90 90 -te 600000 4790220 709800 4900020 -t_srs EPSG:32631 /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9nodata0.tif /tmp/31TFJOulpET/tmpCUGNC4_90m.mnt

gdalwarp: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 90 90 -te 600000 4790220 709800 4900020 -t_srs EPSG:32631 /tmp/31TFJOulpET/tmpCUGNC4/mnt_31TFJ8EsIO9nodata0.tif /tmp/31TFJOulpET/tmpCUGNC4_90mfloat.mnt

gdalwarp: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory Traceback (most recent call last): File "DTMCreation.py", line 326, in creator.run(args.out, args.tempout) File "DTMCreation.py", line 286, in run water_zipped = self.WaterZipped) File "/home/pascal/Start-MAJA/prepare_dtm/../prepare_dtm/tuilage_mnt_eau_S2.py", line 232, in run mnt_90m.decoupe(fic_mnt_in) File "/home/pascal/Start-MAJA/prepare_dtm/../prepare_dtm/lib_mnt.py", line 325, in decoupe (nblig, nbcol, type_donnee, endian) = lire_entete_mnt(fic_hdr_mnt) File "/home/pascal/Start-MAJA/prepare_dtm/../prepare_dtm/lib_mnt.py", line 193, in lire_entete_mnt with open(fic_hdr, 'r') as f: IOError: [Errno 2] No such file or directory: '/tmp/31TFJOulpET/tmpCUGNC4_90m.hdr'

pobsteta avatar Jul 05 '19 08:07 pobsteta

It seems gdalwarp and gdal_rasterize are not working on your platform, could you try it outside of DTM_creation ? Could you please check your gdal installation ? gdal_merge.py seems to work, but it is a python module, not a compiled one. Olivier

olivierhagolle avatar Jul 08 '19 07:07 olivierhagolle