[mapserver-users] layer->getExtent() on raster layer

Frank Warmerdam warmerdam at pobox.com
Wed Nov 18 23:18:32 EST 2009


Dan Little wrote:
> Add the "EXTENT" directive under the LAYER definition...
> 
> LAYER
> ... stuff ...
> EXTENT MINX MINY MAXX MAXY
> ... stuff...
> END
> 
> 
> ----- Original Message ----
>> From: Josh Hevenor <jhevenor at rogers.com>
>> To: mapserver-users <mapserver-users at lists.osgeo.org>
>> Sent: Wed, November 18, 2009 4:23:39 PM
>> Subject: [mapserver-users] layer->getExtent() on raster layer
>>
>> I have a couple raster layers (ECW) and I'm trying to get the extent
>> using php mapscripts' layer->getExtent method. I don't get an error on
>> the call but when I try to use the resulting rectObj (eg.
>> $rectRasterExtent->minx) I get an error trying to access a non-object.
>>
>> Does this function work on raster layers? What might I need in the map
>> file layer definition to facilitate this?

Josh / Dan,

I would add that getExtent() should now work in MapServer 5.6 for raster
layers with a single raster file (as opposed to tileindexed layers).
The EXTENT keyword is still needed for tileindexed layers for which it
is assumed to be expensive (or at least somewhat messy to code) to collect
the extents at runtime.

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