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 <[email protected]>
To: mapserver-users <[email protected]>
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, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to