Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 28/02/2017, à 17:19

Neko62

Prise en charge du format ECW dans QGis

Bonjour à tous,

je viens d'installer QGis 18.4 sur mon système sous Ubuntu 16.04 64 bits.
Je souhaite activer la prise en charge du format raster ECW.
Pour cela je tente de suivre la procédure décrite sur la doc à savoir :
https://doc.ubuntu-fr.org/qgis
Malheureusement ça démarre mal, je me retrouve avec le message suivant lors de l'installation du paquet "libgdal-dev":

tux@tux-P775DM3-G:~$ sudo apt-get install libgdal-dev
[sudo] Mot de passe de tux : 
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Certains paquets ne peuvent être installés. Ceci peut signifier
que vous avez demandé l'impossible, ou bien, si vous utilisez
la distribution unstable, que certains paquets n'ont pas encore
été créés ou ne sont pas sortis d'Incoming.
L'information suivante devrait vous aider à résoudre la situation : 

Les paquets suivants contiennent des dépendances non satisfaites :
 libgdal-dev : Dépend: libgeos-dev mais ne sera pas installé
E: Impossible de corriger les problèmes, des paquets défectueux sont en mode « garder en l'état ».

Quelqu'un aurait-il une piste ?
D'avance merci.

Hors ligne

#2 Le 16/03/2017, à 11:09

Neko62

Re : Prise en charge du format ECW dans QGis

Bonjour à tous,

j'ai progressé :
- j'ai réussi à récupérer le deb de la version 3.5.1 de libgeos-dev sur :
http://packages.ubuntu.com/search?keywo … ection=all
- j'ai du au préalable à l'installation de libgeos-dev, installer la version 3.5.1. de libgeos-c1v5 ( dépendance requise pour libgeos-dev ).
- une fois ces deux paquets d'installés, j'ai pu installé sans problème la version 3.5.1. de libgdal-dev.

A partir de là j'ai repris le tuto du site d'Ubuntu ( https://doc.ubuntu-fr.org/qgis ).
Seul changement, j'ai du retrouver le paquet "libgdal-ecw-src" sur le lien suivant :
https://launchpad.net/~ubuntugis/+archi … e4_all.deb

J'ai donc exécuté les différentes commandes indiquée dans le tuto ( sans soucis apparents ).

J'ai tenté ensuite un "gdalinfo --formats | grep ECW" pour voir si le format ECW était pris en compte et là pas de retour, aucune info.

J'ai donc suivi le tuto avec le lien symbolique de la version 32 bits de "libNCSEcw.so" puis refait un "gdalinfo --formats | grep ECW".
Et là toujours rien, aucun message d'erreur mais aussi aucune confirmation de prise en charge de ce format.

J'ai donc ensuite lancé QGis pour charger une ortho au format ECW et là malheureusement, il m'indique ne pas prendre en charge ce format....

Je ne vois donc pas où ça coince...

Ci-dessous l’enchaînement de commandes réalisé :

tux@tux-P775DM3-G:~$ cd Téléchargements
tux@tux-P775DM3-G:~/Téléchargements$ ar vx '/home/tux/Téléchargements/libgdal-ecw-src_1.10.0-1~precise4_all.deb' 
x - debian-binary
x - control.tar.gz
x - data.tar.gz
tux@tux-P775DM3-G:~/Téléchargements$ tar -xzf data.tar.gz
tux@tux-P775DM3-G:~/Téléchargements$ sudo cp usr/src/libgdal-ecw-1.10.0.tar.gz /usr/src/
[sudo] Mot de passe de tux : 
tux@tux-P775DM3-G:~/Téléchargements$ sudo cp usr/bin/gdal-ecw-build /usr/bin/
tux@tux-P775DM3-G:~/Téléchargements$ sudo gdal-ecw-build /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only
Extracting GDAL/ECW tarball
Building GDAL/ECW plugin
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking C_WFLAGS for maximum warnings... -Wall -Wdeclaration-after-statement
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking CXX_WFLAGS for maximum warnings... -Wall
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ranlib... (cached) ranlib
conftest2.c: In function 'g':
conftest2.c:2:27: warning: zero-length gnu_printf format string [-Wformat-zero-length]
 void g(); void g(){printf("");}
                           ^
checking for g++ -shared ... yes
checking for dlopen in -ldl... yes
checking for nanosleep in -lrt... yes
checking for sin in -lm... yes
checking for ANSI C header files... (cached) yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking dbmalloc.h usability... no
checking dbmalloc.h presence... no
checking for dbmalloc.h... no
checking for dlfcn.h... (cached) yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking whether byte ordering is bigendian... no
checking for 64bit integer type... long long
checking for 64bit file io... yes
checking for stat64... yes
checking for fopen64... yes
checking for ftruncate64... yes
checking size of int... 4
checking size of unsigned long... 8
checking size of void*... 8
checking for int8... no
checking for int16... no
checking for int32... no
checking native cpu bit order... lsb2msb
checking for vprintf... yes
checking for _doprnt... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for atoll... yes
checking for strtof... yes
checking for getcwd... yes
checking whether strtof is declared... yes
checking for readlink... yes
checking for lstat... yes
checking for posix_spawnp... yes
checking for vfork... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking for setlocale... yes
checking whether GCC 4.1 atomic builtins are available... yes
checking for gdal-config... /usr/bin/gdal-config
using /usr/lib/gdalplugins/1.10 as GDAL shared library autoload directory
checking for libNCSEcw.so or libecwj2... found Intergraph 5.x+ SDK in /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/lib/x64/release.
checking for NCSECWClient.h in /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include... found.
checking for ECWJP2BuildNumber.h in /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include... found.
configure: creating ./config.status
config.status: creating GDALmake.opt
config.status: WARNING:  'GDALmake.opt.in' seems to ignore the --datarootdir setting
config.status: executing libtool commands
sed: can't read ./ltmain.sh: No such file or directory
sed: can't read libtoolT: No such file or directory
g++ -g -O2 -fPIC  -Wall  -I/usr/include/gdal -DFRMT_ecw -I-I/usr/include/gdal -DHAVE_ECW_BUILDNUMBER_H -DLINUX -DX86 -DPOSIX -DHAVE_COMPRESS -DECW_COMPRESS_RW_SDK_VERSION -I/usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include  -c -o ecwdataset.o ecwdataset.cpp
In file included from ecwdataset.cpp:30:0:
gdal_ecw.h: In member function ‘virtual bool VSIIOStream::Write(void*, UINT32)’:
gdal_ecw.h:370:51: warning: narrowing conversion of ‘(((VSIIOStream*)this)->VSIIOStream::nCOMLength >> 8)’ from ‘int’ to ‘GByte {aka unsigned char}’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 GByte prevBuffer[] = { nCOMLength >> 8, nCOMLength & 0xff };
                                                   ^
gdal_ecw.h:370:68: warning: narrowing conversion of ‘(((VSIIOStream*)this)->VSIIOStream::nCOMLength & 255)’ from ‘int’ to ‘GByte {aka unsigned char}’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 GByte prevBuffer[] = { nCOMLength >> 8, nCOMLength & 0xff };
                                                                    ^
ecwdataset.cpp: In member function ‘void ECWDataset::ReadFileMetaDataFromFile()’:
ecwdataset.cpp:2669:133: warning: ‘const char* NCS::CString::a_str()’ is deprecated [-Wdeprecated-declarations]
         GDALDataset::SetMetadataItem("FILE_METADATA_CLASSIFICATION", NCS::CString(psFileInfo->pFileMetaData->sClassification).a_str());
                                                                                                                                     ^
In file included from /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include/NCSECWClient.h:89:0,
                 from gdal_ecw.h:56,
                 from ecwdataset.cpp:30:
/usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include/NCSString.h:326:29: note: declared here
  NCS_DEPRECATED(const char *a_str());
                             ^
/usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include/NCSDefs.h:834:30: note: in definition of macro ‘NCS_DEPRECATED’
 #define NCS_DEPRECATED(func) func __attribute__ ((deprecated))
                              ^
g++ -g -O2 -fPIC  -Wall  -I/usr/include/gdal -DFRMT_ecw -I-I/usr/include/gdal -DHAVE_ECW_BUILDNUMBER_H -DLINUX -DX86 -DPOSIX -DHAVE_COMPRESS -DECW_COMPRESS_RW_SDK_VERSION -I/usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include  -c -o ecwcreatecopy.o ecwcreatecopy.cpp
In file included from ecwcreatecopy.cpp:30:0:
gdal_ecw.h: In member function ‘virtual bool VSIIOStream::Write(void*, UINT32)’:
gdal_ecw.h:370:51: warning: narrowing conversion of ‘(((VSIIOStream*)this)->VSIIOStream::nCOMLength >> 8)’ from ‘int’ to ‘GByte {aka unsigned char}’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 GByte prevBuffer[] = { nCOMLength >> 8, nCOMLength & 0xff };
                                                   ^
gdal_ecw.h:370:68: warning: narrowing conversion of ‘(((VSIIOStream*)this)->VSIIOStream::nCOMLength & 255)’ from ‘int’ to ‘GByte {aka unsigned char}’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 GByte prevBuffer[] = { nCOMLength >> 8, nCOMLength & 0xff };
                                                                    ^
g++ -g -O2 -fPIC  -Wall  -I/usr/include/gdal -DFRMT_ecw -I-I/usr/include/gdal -DHAVE_ECW_BUILDNUMBER_H -DLINUX -DX86 -DPOSIX -DHAVE_COMPRESS -DECW_COMPRESS_RW_SDK_VERSION -I/usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include  -c -o jp2userbox.o jp2userbox.cpp
In file included from jp2userbox.cpp:30:0:
gdal_ecw.h: In member function ‘virtual bool VSIIOStream::Write(void*, UINT32)’:
gdal_ecw.h:370:51: warning: narrowing conversion of ‘(((VSIIOStream*)this)->VSIIOStream::nCOMLength >> 8)’ from ‘int’ to ‘GByte {aka unsigned char}’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 GByte prevBuffer[] = { nCOMLength >> 8, nCOMLength & 0xff };
                                                   ^
gdal_ecw.h:370:68: warning: narrowing conversion of ‘(((VSIIOStream*)this)->VSIIOStream::nCOMLength & 255)’ from ‘int’ to ‘GByte {aka unsigned char}’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 GByte prevBuffer[] = { nCOMLength >> 8, nCOMLength & 0xff };
                                                                    ^
g++ -g -O2 -fPIC  -Wall  -I/usr/include/gdal -DFRMT_ecw -I-I/usr/include/gdal -DHAVE_ECW_BUILDNUMBER_H -DLINUX -DX86 -DPOSIX -DHAVE_COMPRESS -DECW_COMPRESS_RW_SDK_VERSION -I/usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/include  -c -o ecwasyncreader.o ecwasyncreader.cpp
In file included from ecwasyncreader.cpp:30:0:
gdal_ecw.h: In member function ‘virtual bool VSIIOStream::Write(void*, UINT32)’:
gdal_ecw.h:370:51: warning: narrowing conversion of ‘(((VSIIOStream*)this)->VSIIOStream::nCOMLength >> 8)’ from ‘int’ to ‘GByte {aka unsigned char}’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 GByte prevBuffer[] = { nCOMLength >> 8, nCOMLength & 0xff };
                                                   ^
gdal_ecw.h:370:68: warning: narrowing conversion of ‘(((VSIIOStream*)this)->VSIIOStream::nCOMLength & 255)’ from ‘int’ to ‘GByte {aka unsigned char}’ inside { } is ill-formed in C++11 [-Wnarrowing]
                 GByte prevBuffer[] = { nCOMLength >> 8, nCOMLength & 0xff };
                                                                    ^
g++ -shared   ecwdataset.o ecwcreatecopy.o jp2userbox.o ecwasyncreader.o  -L/usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/lib/x64/release -lNCSEcw \
    -o gdal_ECW_JP2ECW.so
install -d /usr/lib/gdalplugins/1.10
cp gdal_ECW_JP2ECW.so /usr/lib/gdalplugins/1.10
tux@tux-P775DM3-G:~/Téléchargements$ sudo mkdir /usr/lib/gdalplugins/1.11
tux@tux-P775DM3-G:~/Téléchargements$ cd /usr/lib/gdalplugins/1.10
tux@tux-P775DM3-G:/usr/lib/gdalplugins/1.10$ dir
gdal_ECW_JP2ECW.so
tux@tux-P775DM3-G:/usr/lib/gdalplugins/1.10$ sudo cp gdal_ECW_JP2ECW.so /usr/lib/gdalplugins/1.11
tux@tux-P775DM3-G:/usr/lib/gdalplugins/1.10$ gdalinfo --formats | grep ECW
tux@tux-P775DM3-G:/usr/lib/gdalplugins/1.10$ sudo cp /usr/local/lib/libNCSEcw.so /usr/local/lib/libNCSEcw.so.old
tux@tux-P775DM3-G:/usr/lib/gdalplugins/1.10$ sudo rm /usr/local/lib/libNCSEcw.so
tux@tux-P775DM3-G:/usr/lib/gdalplugins/1.10$ sudo ln -s /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.3.0/Desktop_Read-Only/lib/x86/release/libNCSEcw.so /usr/local/lib/libNCSEcw.so
tux@tux-P775DM3-G:/usr/lib/gdalplugins/1.10$ gdalinfo --formats | grep ECW

Hors ligne