[gdal-dev] Extracting (arbitrary?) overviews from ECW file

Markus Schneider schneider at occamlabs.de
Thu Sep 5 09:01:14 PDT 2013


Frank,

thanks for your reply. Could you (or somebody else) give me a few more
details how to get hold of a raster region with a resolution that is not
defined by an overview?

Currently, I am able to extract regions from an overview using the
following steps (in Java):

...
  Dataset dataset = gdal.Open( "dataset.ecw", GA_ReadOnly );
  Band band = dataset.GetRasterBand( ... );
  band = band.GetOverview(...);
  band.ReadRaster(x,y, ...)
...

Afterwards, I have the raw data values in my array. It works fine for
any overview.

My problem is that I cannot figure out how to get hold of a Band for a
non-predefined overview. How would I do this?

Best regards,
Markus

Am 04.09.2013 18:15, schrieb Frank Warmerdam:
> Markus,
> 
> I believe the GDAL ECW driver will pass RasterIO() requests through to
> the ECW SDK to evaluate meaning that there is no constraint based on the
> advertized power-of-two overviews exposed from GDAL and no loss of quality.
> 
> Best regards,
> Frank
> 
> 
> On Wed, Sep 4, 2013 at 6:52 AM, Markus Schneider <schneider at occamlabs.de
> <mailto:schneider at occamlabs.de>> wrote:
> 
>     Dear list,
> 
>     I am new to programming with GDAL (and to the ECW format). Let me say
>     thank you first, because my first experiences have been rather pleasant,
>     even if my setup is relatively involved (thanks everybody for providing
>     good documentation):
> 
>     - Ubuntu 12.04 (AMD64)
>     - GDAL 1.10.1 (build from source)
>     - ECW SDK 5.0
>     - GDAL Java bindings
> 
>     I successfully created a toy Java class for extracting regions from an
>     ECW file. Speed is impressive.
> 
>     My observations/questions:
> 
>     - If I understand correctly, ECW files internally do not have such a
>     thing as fixed overviews. However, ECW supports extraction of regions
>     with specified resolution on-the-fly. Is this correct?
>     - GDAL API reports overviews for ECW datasets. Having a first look at
>     the code, it seems to generate overview dimensions by subsequently
>     dividing height and width by two (until a minium side length of 128 has
>     been reached).
> 
>     Final question: Is it possible to efficiently retrieve (regions of)
>     overviews at self-defined scales using the GDAL API? Or do I have to use
>     the ECW SDK for that?
> 
>     Keep up the good work. Thanks for any pointers.
> 
>     Best regards,
>     Markus
> 
>     --
>     Markus Schneider
>     CEO
> 
>     Occam Labs UG (haftungsbeschränkt)
>     Godesberger Allee 139
>     53175 Bonn, Germany
> 
>     +49 228 93798874 <tel:%2B49%20228%2093798874>
> 
>     http://www.occamlabs.de
> 
> 
>     _______________________________________________
>     gdal-dev mailing list
>     gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> 
> 
> 
> -- 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com <mailto:warmerdam at pobox.com>
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Software Developer


-- 
Markus Schneider
CEO

Occam Labs UG (haftungsbeschränkt)
Godesberger Allee 139
53175 Bonn, Germany

+49 228 93798874

http://www.occamlabs.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130905/2f9be949/attachment.pgp>


More information about the gdal-dev mailing list