Georeferencing Mrsid raster file with a world file

H. Porath porath at WEB.DE
Tue Nov 13 01:39:35 PST 2007


Volkan,

we had the same problem with our mrsid files. We solved it by patching
mrsiddataset.cpp in gdal. gdal first looks for internal georeferences and
only looks for worldfiles if the internal georeferencing failes. We just
changed this behaviour by  exchanging two blocks of code. Now, gdal first
looks for world files and then uses internal georeferences.  In detail:

before:
 if ( !poImageReader->isGeoCoordImplicit() )
    {
      ... block a ....
    }
    else if( iZoom == 0 )
    {
     ... block b ...
    }

after:

    if( iZoom == 0 )
    {
     ... block b ...
    }
    else if( !poImageReader->isGeoCoordImplicit() )
    {
     ... block a ...
    }


Hope this helps,

Holger



More information about the MapServer-users mailing list