[mapserver-users] Dem classification
Dylan Beaudette
dylan.beaudette at gmail.com
Mon Apr 20 08:22:25 PDT 2009
You could always apply the elevation classification in a standard GIS
like GRASS, and then save the color-mapped image and use that instead
of the original DEM.
Cheers,
Dylan
On Mon, Apr 20, 2009 at 3:30 AM, leonidas <leonidas_liakos at yahoo.gr> wrote:
>
> How can I generate a colormap for my raster (geotiff) dem in a mapfile. I
> have found a way but it's to difficult to generate so much classes and find
> the appropriate colors one by one.
> So my layer in mapfile look like this:
> LAYER
> NAME DEM
> TYPE raster
> STATUS default
>
>
> DATA "E:\leonidas\dem.tif"
>
> PROCESSING "SCALE=-10,2000"
> PROCESSING "SCALE_BUCKETS=2000"
>
>
>
> PROJECTION
> 'proj=tmerc'
> 'lat_0=0'
> 'lon_0=24'
> 'k=0.9996'
> 'x_0=500000'
> 'y_0=0'
> 'ellps=GRS80'
> 'towgs84=-199.87,74.79,246.62,0,0,0,0'
> 'units=m'
> 'no_defs'
> ''
> END
>
>
> CLASSITEM "[pixel]"
>
> CLASS NAME '-1,5 - -1 m' EXPRESSION ( [pixel] >= -1.5 AND [pixel] < -1
> )COLOR 26 117 132 END
> CLASS NAME '-1 - -0,5 m' EXPRESSION ( [pixel] >= -1 AND [pixel] < -0.5
> )COLOR 28 126 133 END
> CLASS NAME '-0,5 - 0 m' EXPRESSION ( [pixel] >= -0.5 AND [pixel] < 0 )
> COLOR 29 135 134 END
> CLASS NAME ' 0 - 0,5 m' EXPRESSION ( [pixel] >= 0 AND [pixel] < 0.5 )
> COLOR 31 144 135 END
> CLASS NAME ' 0,5 - 1 m' EXPRESSION ( [pixel] >= 0.5 AND [pixel] < 1 )
> COLOR 33 152 136 END
> CLASS NAME ' 1 - 1,5 m' EXPRESSION ( [pixel] >= 1 AND [pixel] < 1.5 )
> COLOR 35 158 137 END
> CLASS NAME ' 1,5 - 2 m' EXPRESSION ( [pixel] >= 1.5 AND [pixel] < 2 )
> COLOR 38 163 128 END
> CLASS NAME ' 2 - 2,5 m' EXPRESSION ( [pixel] >= 2 AND [pixel] < 2.5 )
> COLOR 44 170 116 END
> CLASS NAME ' 2,5 - 3 m' EXPRESSION ( [pixel] >= 2.5 AND [pixel] < 3 )
> COLOR 49 176 104 END
> CLASS NAME ' 3 - 3,5 m' EXPRESSION ( [pixel] >= 3 AND [pixel] < 3.5 )
> COLOR 54 183 92 END
> CLASS NAME ' 3,5 - 4 m' EXPRESSION ( [pixel] >= 3.5 AND [pixel] < 4 )
> COLOR 60 190 80 END
> CLASS NAME ' 4 - 4,5 m' EXPRESSION ( [pixel] >= 4 AND [pixel] < 4.5 )
> COLOR 66 196 68 END
> CLASS NAME ' 4,5 - 5 m' EXPRESSION ( [pixel] >= 4.5 AND [pixel] < 5 )
> COLOR 72 203 56 END
> CLASS NAME ' 5 - 6 m' EXPRESSION ( [pixel] >= 5 AND [pixel] < 6 )
> COLOR 77 209 44 END
> CLASS NAME ' 6 - 7 m' EXPRESSION ( [pixel] >= 6 AND [pixel] < 7 )
> COLOR 83 216 31 END
> CLASS NAME ' 7 - 8 m' EXPRESSION ( [pixel] >= 7 AND [pixel] < 8 )
> COLOR 88 222 20 END
> CLASS NAME ' 8 - 9 m' EXPRESSION ( [pixel] >= 8 AND [pixel] < 9 )
> COLOR 94 229 8 END
> END # of layer grid1
>
> I have to do that until 2000m height. Is there any other options to classify
> my dem's colors?
> Thank you, Leonidas
> --
> View this message in context: http://n2.nabble.com/Dem-classification-tp2662869p2662869.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list