[Mapserver-users] Just call me a newbie . . . multiple Raster LAYERs question

Sean Gillies sgillies at frii.com
Wed Mar 17 18:26:47 EST 2004


On Mar 17, 2004, at 4:12 PM, Bob Basques wrote:

> All,
>
> Let's say I have Six different levels of resolution of Aerial Photo's  
> all of them having the same coverage extents.
>
> Can I use different source data (a different tileindex for each of the 
> levels above) for different classifications of the LAYER?
>
> Like the following, which is the coursest layer at 16 feet per pixel:
>
> #
> # Start of map file
> #
> MAP
>  NAME CITIPIX
>  STATUS ON
>  SIZE 600 600
>  EXTENT 540000 135000 600000 175000
>  UNITS FEET
>  SHAPEPATH "./data"
>  IMAGECOLOR 255 255 255
>
>  IMAGETYPE JPEG
>
>  LAYER
>    NAME "AERIALS"
>    STATUS DEFAULT
>    TILEINDEX "RAST_STPL_PW_AER_SUR_2001_06_L5"
>    TILEITEM "Location"
>    TYPE RASTER
>  END
>
> END # Map File
>
> I have five other TILEINDEXes,
>
> RAST_STPL_PW_AER_SUR_2001_06_L4 = 8 feet per pixel
> RAST_STPL_PW_AER_SUR_2001_06_L3 = 4
> RAST_STPL_PW_AER_SUR_2001_06_L2 = 2
> RAST_STPL_PW_AER_SUR_2001_06_L1 = 1
> RAST_STPL_PW_AER_SUR_2001_06_L0 = 0.5
>
> Do I need to make a layer for each tile index, or can they all be 
> sourced under the same LAYER definition (aerials)?  There will only 
> ever be one of them at a time visible.  So can the layer look like 
> this (or some close)?
>
>  LAYER
>    NAME "AERIALS"
>    STATUS DEFAULT
> class [pixel]
> classitem  ( [pixel]   >=   16 )   ## what does "pixel" represent 
> anyway?  It's not clear to me from the HowTo
>    TILEINDEX "RAST_STPL_PW_AER_SUR_2001_06_L5"
> classitem  ([pixel} >= 8 )
>    TILEINDEX "RAST_STPL_PW_AER_SUR_2001_06_L4"
> classitem  ([pixel} >= 4 )
>    TILEINDEX "RAST_STPL_PW_AER_SUR_2001_06_L3"
> classitem  ([pixel} >= 2 )
>    TILEINDEX "RAST_STPL_PW_AER_SUR_2001_06_L2"
> classitem  ([pixel} >= 1 )
>    TILEINDEX "RAST_STPL_PW_AER_SUR_2001_06_L1"
> classitem  ([pixel} >= 0.5 )
>    TILEINDEX "RAST_STPL_PW_AER_SUR_2001_06_L0"
>    TILEITEM "Location"
>    TYPE RASTER
>  END
>
>
> or do I need to class them each as seperate layers in the map file 
> with a max/min specification?
>
> Thanks
>
> bobb
>

Separate layer for each, but use the same GROUP for all so you can turn 
the
collection on/off together.

LAYER
   NAME "16F"
   GROUP "AERIAL"
   MINSCALE 100000
   ...
END
LAYER
   NAME "8F"
   GROUP "AERIAL"
   MAXSCALE 100000
   MINSCALE 50000
   ...
END
...

cheers,
Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies




More information about the mapserver-users mailing list