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

Lars Schylberg lars.schylberg at blixtmail.se
Thu Feb 4 12:13:28 PST 2021


To reduce size this guide is still good: 
http://blog.cleverelephant.ca/2015/02/geotiff-compression-for-dummies.html

/Lars S.

Den 2021-02-04 kl. 21:00, skrev Pteroglossus via gdal-dev:
> Richard, thanks you for your support, I would not have done it without you!
>
> I tried to convert one of my files as suggested:
>
> k at k-GS60-6QE:/media/k/Data/Data/Perso/Carto$ gdal_translate -of GTiff SCAN50_2012.ecw SCAN50_2012.tif
> Input file size is 75000, 95000
> 0...10...20...30...40...50...60...70...80...90...100 - done.
>
> It turned my 2.3GB .ecw into a ...21.4GB .tif. There must be some arguments to be added in order to reduce the size of the output file. Any ideas?
>
>
> As for installing GRASS GIS, I suspected it wouldn't be as easy as a normal apt-get install...
>
> Thanks Markus for your input, I read the Quick_instructions for Ubuntu 20.04, and it seems doable. One question though, I won't install GDAL as a prerequisite as instructed because I've compiled it myself, right?
>
> Therefore, I'm gonna need to tell the compiler to get GDAL from the folder it's been installed in. The only reference to GDAL in the guide, apart from the prerequisite install is:
>
> # "configure" source code for local machine (checks for CPU type etc):
> MYCFLAGS='-O2 -fPIC -fno-common -fexceptions -std=gnu99 -fstack-protector -m64'
> #MYCXXFLAGS=''
> MYLDFLAGS='-Wl,--no-undefined -Wl,-z,now'
>
> LDFLAGS="$MYLDFLAGS" CFLAGS="$MYCFLAGS" CXXFLAGS="$MYCXXFLAGS" ./configure \
>    --with-cxx \
>    --enable-largefile \
>    --with-proj --with-proj-share=/usr/share/proj \
>    --with-gdal=/usr/bin/gdal-config \
>
> I happen to have a "gdal-config" in /usr/bin/ but it must be a remnant of a previous install because the creation date is March 29th 2020. Should I change the argument to
> "--with-gdal=/home/k/bin/gdal/gdal-3.1.4/bin/gdal-config" which is the location of the one I compiled?
>
> Best,
> Kevin
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Thursday, February 4, 2021 6:25 AM, Markus Neteler <neteler at osgeo.org> wrote:
>
>> On Thu, Feb 4, 2021 at 9:28 AM Richard Duivenvoorde rdmailings at duif.net wrote:
>>
>>> 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!
>> ...
>>
>>> 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)?
>> I'd recommend to just compile also GRASS GIS locally (which is rather
>> easy) to avoid a dependency hell.
>>
>> See (unsorted):
>>
>> -   Debian: https://grasswiki.osgeo.org/wiki/Compile_and_Install#GRASS_7_on_Debian_Buster
>> -   Ubuntu: https://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Quick_instructions
>> -   Fedora: https://grasswiki.osgeo.org/wiki/Compile_and_Install#GRASS_GIS_7_on_Fedora
>> -   Linux Mint: https://grasswiki.osgeo.org/wiki/Compile_and_Install#Linux_Mint
>> -   Windows:https://grasswiki.osgeo.org/wiki/Compile_and_Install#MS-Windows
>> -   MacOS: https://grasswiki.osgeo.org/wiki/Compile_and_Install#macOS
>>
>>      etc. on that Wiki page.
>>
>>      Most of them are copy-paste instructions.
>>
>>      HTH,
>>      Markus
>>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list