[mapserver-users] Should "EXTENT_PRIORITY=WORLDFILE" work now?

Frank Warmerdam warmerdam at pobox.com
Tue Oct 21 10:33:48 EDT 2008


Rahkonen Jukka wrote:
> Hi,
> 
> Frank Warmerdam wrote in February 2008:
> 
>> In have encorporated an undocumented raster layer processing
>> option called EXTENT_PRIORITY in trunk.  Set the value to WORLDFILE
>> to use world files in priority to internal information.
> 
>> eg.
>>    PROCESSING "EXTENT_PRIORITY=WORLDFILE"
> 
>> This will appear in the next FWTools build since it is part of
>> trunk (and will appear in MapServer 5.2 when released).  I'm not
>> inclined to try and port it back into 5.0 branch. 
> 
> I would have actual use for this feature now and I tried to use it with
> MS4W Mapserver v. 5.2.0 and also with the Mapserver 5.3-dev that comes
> with FWTools 2.2.6.  However, I did not see any effect when using this
> PROCESSING option. I tried to use the option both for a layer having
> just a single tiff file and for a tileindex raster layer, but extents
> seem to come always from internal GeoTIFF information. Is the option
> supposed to work?

Jukka,

Yes, it should work, though looking at the code it only looks for world
files with the extension .wld in this case (not .tfw, or .tifw).  The code
is:

/* -------------------------------------------------------------------- */
/*      Do we want to override GDAL with a worldfile if one is present? */
/* -------------------------------------------------------------------- */
     extent_priority = CSLFetchNameValue( layer->processing,
                                          "EXTENT_PRIORITY" );

     if( extent_priority != NULL
         && EQUALN(extent_priority,"WORLD",5) )
     {
	        if( GDALGetDescription(hDS) != NULL
             && GDALReadWorldFile(GDALGetDescription(hDS), "wld",
                                  padfGeoTransform) )
         {
             return MS_SUCCESS;
         }
     }

If you find it does not work with .wld files, file a ticket with details.
If you feel it is particularly perverse that it requires .wld instead of
.tfw or .tifw (which normally work), you can file a ticket on that too.

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 mapserver-users mailing list