ecw sdk gdal

493 views
Skip to first unread message

Alexandra Mates

unread,
Jun 17, 2014, 12:45:08 PM6/17/14
to rsgislib...@googlegroups.com
I'd like to visualise ecw and jp2 / jpeg2000 images in tuiview, or preferably in QGIS (none of them can open this AP format).
My current gdal version that came with the osgeo envmaster 20131004 also doesn't seem to support the formats. On the GDAL supported formats webpage, and a little bit of searching, it became clearer that I need the ECW SDK library from Erdas on top of gdal.

The kind of questions I'm asking myself at the moment sound like:
- If I do the conda install of rsgislib following Dan's post in spectraldifferences, will that version come with the ecw sdk library?
- Will the library be available when rsgislib 2.2 is released?
- Should I rather try and install gdal with ecw on my local machine, without sourcing osgeo.sh? And if yes, where could I find some installation instructions?

All comments and opinions welcome! :-)

Daniel Clewley

unread,
Jun 17, 2014, 1:34:29 PM6/17/14
to Alexandra Mates, rsgislib...@googlegroups.com
Hi Alex,

The short answer is because ECW isn't open source I think it's going to be a bit of a pain to get working (I've never tried myself). There is an OpenJPEG library which GDAL can use so JPEG2000 should be easier to include. 

On 17 Jun 2014, at 09:45, Alexandra Mates <alexand...@envsys.co.uk> wrote:

I'd like to visualise ecw and jp2 / jpeg2000 images in tuiview, or preferably in QGIS (none of them can open this AP format).
My current gdal version that came with the osgeo envmaster 20131004 also doesn't seem to support the formats. On the GDAL supported formats webpage, and a little bit of searching, it became clearer that I need the ECW SDK library from Erdas on top of gdal.

The kind of questions I'm asking myself at the moment sound like:
- If I do the conda install of rsgislib following Dan's post in spectraldifferences, will that version come with the ecw sdk library?

No, this comes with GDAL 1.11 but it's not built with ECW support, only HDF5 and KEA. The license for the ECW SDK doesn't allow re-distribution so legally it wouldn't be possible for us to make the ECW plugin available through conda.

- Will the library be available when rsgislib 2.2 is released?

GDAL drivers are independent of RSGISLib, any version of GDAL that we include as part of an RSGISLib distribution made publicly available (through EnvMaster or conda) won't include ECW, due to license restrictions.

- Should I rather try and install gdal with ecw on my local machine, without sourcing osgeo.sh? And if yes, where could I find some installation instructions?

If you want to use ECW with TuiView and RSGISLib the simplest option is probably installing the same version of GDAL as in EnvMaster but building with ECW support (in this way you shouldn't need to rebuild everything else). There are some instructions on how to do this here:


To build you will need to run something like:

./configure --prefix=/share/osgeo/fw/gdal/1.11.0_ecw \
--with-hdf5=$HDF5_ROOT \
--with-xerces=$XERCES_C_ROOT \
--with-geos=$GEOS_BIN_PATH/geos-config \
--with-static-proj4=$PROJ4_ROOT \
--with-python \
--with-ecw=$ECW_ROOT \
--enable-shared=yes --enable-static=no --disable-rpath

And then set up envmaster to load the version of GDAL with ECW, rather than the default. There is a brief intro to envmaster here:


I'm not sure how to get ECW working with QGIS, which I assume uses a different version of GDAL installed through the package manager.

Hope this is of some help.

Thanks,

Dan


All comments and opinions welcome! :-)


--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Trethewey

unread,
Jun 17, 2014, 1:35:00 PM6/17/14
to Alexandra Mates, rsgislib...@googlegroups.com
I have started using HiRISE images of Mars for my MSc dissertation, so
have needed to open .JP2 files.

I have recompiled GDAL on my computer with the ECW library, from here:
http://download.intergraph.com/downloads/erdas-ecw-jp2-sdk-v5.1-%28linux%29

The instructions on that website are somewhat limited, it comes in a
self-extracting .sh file, there are a few more instructions inside that
once extracted in the "userguide/" folder. Nevertheless, I seem to
remember having a little trouble getting the right library files to be
found by gdal.

Compiling GDAL itself shouldn't be too complicated just add the
--with-ecw=/usr/local (if the ECW library is at /usr/local) to the
./configure command as described at http://trac.osgeo.org/gdal/wiki/ECW

Once done this I have converted to .kea rather than try opening .jp2
files directly in tuiview or QGIS.

I hope this helps,

David Trethewey
> <http://rspsoc2014.co.uk/>
> *RSPSoc 2014 - 2nd -5th September <http://rspsoc2014.co.uk/>*
>
> --
> You received this message because you are subscribed to the Google
> Groups "RSGISLib Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to rsgislib-suppo...@googlegroups.com
> <mailto:rsgislib-suppo...@googlegroups.com>.

Joshua Jones [jsj8]

unread,
Jun 17, 2014, 6:10:00 PM6/17/14
to David Trethewey, Alexandra Mates, rsgislib...@googlegroups.com
I haven't got much to impart but I had Brazil's entire 50m DEM in JP2 files. Pete either wrote something into envmaster to convert them to KEA or I have a script somewhere on my computer....

I'll have a look tomorrow.
________________________________________
From: rsgislib...@googlegroups.com [rsgislib...@googlegroups.com] on behalf of David Trethewey [david...@gmail.com]
Sent: 17 June 2014 18:00
To: Alexandra Mates
Cc: rsgislib...@googlegroups.com
Subject: Re: [rsgislib-support] ecw sdk gdal

I hope this helps,

David Trethewey

To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages