[mapserver-users] Re: Hiding overviews

Delfos, Jacob Jacob.Delfos at maunsell.com
Thu Mar 6 01:57:02 EST 2008


Hi Andreas,

I use a similar approach, but not under WMS circumstances. But basically
I take advantage of the fact that layers in MapServer that have the same
name, will switch on/off at the same time. For example, I can create a
layer called "Satellite Image", which is a tile-index. I can then add
another layer called "Satellite Image", which actually points to a
single raster image (overview). As long as MapServer is told to switch
on "Satellite Image", it will draw all layers by that name (but still
respecting minscale and maxscale). I am not sure how this will affect a
"getCapabilities" document, though.

You *could* look into using the "requires" attribute, but I think this
may not work well in combination with minscale/maxscale. The last option
(perhaps the most logical one) is to put them into the same group. I
believe that should cause MapServer to draw them at the same time.

Hope this helps,

Jacob


 

> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org 
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of 
> Eichner, Andreas - SID-NLK
> Sent: 6 March 2008 15:41
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] Re: Hiding overviews
> 
> 
> Hmm, seems my description wasn't clear enough, so I'll try to 
> precise...
> 
> For a layer with raster data I created external overviews. To make use
> of them I copied the LAYER portion of the map file, changed the
> TILEINDEX statement to point to the index of the appropriate overview,
> set MINSCALE/MAXSCALE to form a continues range and added a GROUP
> statement to all of them to form a single layer again as it was before
> without the overviews added. Now I can take a WMS client, enable or
> disable the layer group which collects the detail layer and 
> all of it's
> overviews which kick in if you increase the scale.
> 
> So instead of having a single layer consisting of huge tiled 
> which have
> all to be touched and scaled down for a request at large scales I now
> have a group consisting of several layers where only one is active at
> each scale. Doing so was a suggestion from the raster data 
> (optimizing)
> howto and they called this solution "external overviews".
> 
> So if I have a layer "raster" (scale 10...5000000) I want to split it
> into "detail" (scale 10...1000) and "overview" (scale 1000...5000000)
> and put both in a _group_ "raster" for example. Now you can go and
> request the layer "raster" as before and what you get depends on the
> chosen scale and is either "detail" below 1000 or "overview" 
> above 1000.
> 
> The problem is that you can explicitly request the layer "detail", but
> if you are above 1000 you will see... Absolutely nothing. 
> Same with the
> "overview" layer below 1000. This is because those layers have a name
> which enables them to be requested in a WMS "GetMap" request. If they
> wouldn't you could only request the named group layer "raster". So I
> thought it could be done by ommitting the "wms_name" part of the
> METADATA but if you do and issue a "GetCapabilities" request you will
> see that MapServer outputs a warning about the missing mandatory name
> attribute and inserts the layer name from the NAME attribute 
> of the map
> file.
> 
> We have a WMS client which displays nested named layers as 
> folders. The
> result isn't user friendly... So I wondered if there's a way to hide
> those external overviews from the user since the only thing he can
> decide is either to display the hole group (which ever layer may be
> affected) or none of those layers at all.
> 
> Hope I could make the situation a little bit clearer. I believe it's
> only a little thing I miss but there are too much trees in 
> the wood... 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 

This email and any attachments are intended solely for the named recipient and are confidential. The copying or distribution of them or any information they contain by anyone other than the named recipient is prohibited. If you have received this document in error, please notify the sender and delete all copies from your computer system and destroy all hard copies. It is the recipient's responsibility to check this email and any attachments to this email for viruses before use.


More information about the mapserver-users mailing list