[Gdal-dev] MrSID

Frank Warmerdam warmerdam at pobox.com
Wed Nov 3 09:41:31 EST 2004


Martin Daly wrote:
> Frank, Andrey,
> 
> The MrSID driver opens MrSID images like this:
> 
>         poDS->poImageReader = new MrSIDImageReader( oFileSpec );
> 
> But there is a useful second parameter to the constructor, useWorldFile,
> which defaults to false:
> 
>    MrSIDImageReader(const LTFileSpec& fileSpec,
>                     bool useWorldFile = false,
>                     MrSIDMemoryUsage
> memoryUsage=MRSID_MEMORY_USAGE_DEFAULT,
>                     MrSIDStreamUsage
> streamUsage=MRSID_STREAM_USAGE_DEFAULT);
> 
> What do you think about changing the line to be:
> 
>         poDS->poImageReader = new MrSIDImageReader( oFileSpec, true );
> 
> That way, opening a (typically old) MrSID file that has an accompanying
> .SDW "world" file will read the .SDW geo-referencing.  I can provide an
> off-list sample if you need one.

Martin,

I would agree that we should have support for sdw files.  Does the
world file override the internal georeferencing if it is present?  I'm not
sure if that is wise though it might be.  In the case of GeoTIFF I have
taken the approach of only consulting the world file if there is no internal
georeferencing transformation.

We could also just use the normal GDAL world file support.

Andrey ... I leave it in your hands to implement as you see fit.

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