Christian Wilmes wrote:
Hi All,

ist there any possibility to find out, if a Rasterlayer is in the Extent of
a Map. There is just one Layer in my Map and I want to know if the map will
be blank or the Layer is visible. A possibility is to test each pixel if it
is transparent or not, but that is not very effectiv. I thought about first
drawing a map with just one 1x1 Pixel, but if the Extent of the Layer is
much smaller than the extent of the map the result will be a transparent
pixel even the Layer is in the extent of the map.

I tried out the method layerObj.isVisible(), but it doesn't have a look on
the extent of the map.

Is there any possibility to find out if a Layer is really visible or just
getting the extent of the raster-layer in the Reference-System of the map?

Christian,

There is no mechanism to accomplish this through mapscript unless you have
set explicit extents on your layer using metadata or the EXTENT keyword.

It should be possible to use GDAL C# bindings to query extents of a
raster file if you have those bindings available (this may not be trivial!)

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    | President OSGeo, http://osgeo.org

Reply via email to