[Gdal-dev] gdal with ECW JPEG 2000 SDK v3.1
Frank Warmerdam
fwarmerdam at gmail.com
Thu Mar 17 09:38:28 EST 2005
On Thu, 17 Mar 2005 15:13:08 +0800, Tom Lynch <tflynch at gmail.com> wrote:
> I previously responded to Brent off list on this topic, but for the
> benefit of anyone else wishing to enable unlimited compression to ECW
> and JPEG 2000 via GDAL and the ECW JPEG 2000 SDK, these are the
> specific changes that are necessary in the GDAL source code (both are
> calls to CNCSFile::SetKeySize):
>
> 1. Changes to ecwcreatecopy.cpp:
>
> -----------------------------------------
> CPLErr GDALECWCompressor::Initialize(
> const char *pszFilename, char **papszOptions,
> int nXSize, int nYSize, int nBands,
> GDALDataType eType,
> const char *pszWKT, double *padfGeoTransform,
> int bIsJPEG2000 )
>
> {
> SetKeySize();
Folks,
I have changed the GDAL code in CVS (but after the 1.2.6 release)
so that this call is made if the ECW_LARGE_OK configuration option
is set to YES. Configuration options can be set at the commandline
using the --config option (eg. --config ECW_LARGE_OK YES),
as environment variables or at the API level by calling
CPLSetConfigOption(). Please only do this if you are complying
with the appropriate licensing requirements.
> 2. Changes to ecwdataset.cpp:
>
> -----------------------------------------
>
> GDALDataset *ECWDataset::Open( GDALOpenInfo * poOpenInfo )
>
> <snip>
>
> /* -------------------------------------------------------------------- */
> /* Open the client interface. */
> /* -------------------------------------------------------------------- */
> if( poFileView == NULL )
> {
> poFileView = new CNCSFile();
> poFileView->SetKeySize();
> -----------------------------------------
>
> These two lines are needed in addition to linking with NCSEcwCu.lib
> (or libNCSEcwCu.o if you're building the SDK from source on *NIX) for
> unlimited compression.
Tom - what does this do? Is SetKeySize() needed to *read* large
ECW files?
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list