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

Siki Zoltan siki at agt.bme.hu
Thu Mar 18 01:58:24 PST 2004


Hi,

On Wed, 17 Mar 2004, 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 

the pixel represents the color code for the pixel not the size!
the are some cgi variable, you can calculate the resolution of the
mapserver generated image. But I thing it won't help you.

> 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

It won't work.
You should create six tile index and six layer and set MINSCALE and 
MAXSCALE for them to turn the best one for a scale. You can add them to
the same group, so you can easily turn them on and off through the group 
name.
An other solution may be the sid format (may be the ecw to).
As far as I know ecw is supported in the nightly built version.
As far as I know MrSid is not supported :(
These format can contain multi resolution image sources, that case you can 
use the six different resolution tile as one image, that case no need for 
tileindex.

Bye
Zoltan

> 
> 
> or do I need to class them each as seperate layers in the map file with 
> a max/min specification?
> 
> Thanks
> 
> bobb
> 
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 




More information about the MapServer-users mailing list