[gdal-dev] Fw: Building GDAL with ECW support

Richard Duivenvoorde rdmailings at duif.net
Thu Feb 4 00:28:18 PST 2021


On 2/4/21 1:55 AM, pteroglossus at pm.me wrote:
> Installing libproj-dev did the trick, I was able to run the config file, rename/copy the necessary folders in the SDK, then "make"/ "make install", encountered some issues during the process but:
> 
> k at k-GS60-6QE:~/bin/gdal/gdal-3.1.4$ gdalinfo --version
> GDAL 3.1.4, released 2020/10/20
> k at k-GS60-6QE:~/bin/gdal/gdal-3.1.4$ gdalinfo --formats|grep ECW
>   ECW -raster- (rw+): ERDAS Compressed Wavelets (SDK 5.5)
>   JP2ECW -raster,vector- (rw+v): ERDAS JPEG2000 (SDK 5.5)
> 
> This means it worked, doesn't it? :)

YES!!!  You compile GDAL with ecw yourself! congrats!

But.. we installed it in a place where you can only use it (at this moment) via cli (so you can use all the commands IF you set the PATH and LD_LIBRARY_PATH).
So now you are able to use gdal_translate to make geotiffs from you ecw...

> One last question if you don't mind, now that GDAL is installed and configured, should I simply reinstall GRASS using apt-get and import my layers and voilà? Or is there any step I should take beforehand?

Nope, THAT is another question. Probably better answered by some Linux/Grass guru's...

My guess: if you would install GRASS via apt-get, your linux distro will automagically also install GDAL (from the distro, without ecw) next to it. AND GRASS is probably linked to that... so will use the gdal installed in /usr/lib/ or so

Not sure if you can fool GRASS to use your own compiled GDAL (by creating some symbolic links, OR by installing your GDAL in the normal /usr/lib), that depends on which version GRASS is actually build against (I think...)
My guess is that you have an older distro, which does not have GDAL 3.1 (because you started of compiling GDAL 2.4.x or so) so the symbolic links will not work (I think...).

So others? Is there a way (other then let this user also compile GRASS against his newly compiled GDAL 3.1)?

Regards,

Richard Duivenvoorde



More information about the gdal-dev mailing list