From: Regina Obe Date: Wed, 14 Apr 2010 11:40:28 +0000 (+0000) Subject: Document how to define a raster layer in Mapserver X-Git-Tag: 2.0.0alpha1~3036 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e7512e004ba120e9551efffe3f5ef15c3f39d19;p=postgis Document how to define a raster layer in Mapserver git-svn-id: http://svn.osgeo.org/postgis/trunk@5543 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/faq_wktraster.xml b/doc/faq_wktraster.xml index 181b74070..fb24a0d5f 100644 --- a/doc/faq_wktraster.xml +++ b/doc/faq_wktraster.xml @@ -81,6 +81,74 @@ To see more examples and syntax refer to Reading Raster Data of PostGIS WKT Raster section + + + + What tools can I use to view PostGIS raster data? + + + + You can use MapServer compiled with GDAL 1.7+ and PostGIS WKT Raster driver support to view Raster data. In + theory any tool that renders data using GDAL can support PostGIS raster data or support it with fairly minimal effort. + + + + + + How can I add a PostGIS raster layer to my Mapserver map. + + + + You can much like you can with any other raster. Refer to Mapserver Raster processing options + for list of various processing functions you can use with Mapserver raster layers. + What makes PostGIS raster data particularly interesting, is that since each tile can have various standard database columns, you can segment it in your data source + Below is an example of how you would defined a PostGIS raster layer in Mapserver. + +-- displaying raster with standard raster options +LAYER + NAME coolwktraster + TYPE raster + STATUS ON + DATA "PG:host=localhost port=5432 dbname='somedb' user='someuser' password='whatever' schema='someschema' table='cooltable'" + PROCESSING "NODATA=0" + PROCESSING "SCALE=AUTO" + #... other standard raster processing functions here + #... classes are optional but useful for 1 band data + CLASS + NAME "boring" + EXPRESSION ([pixel] < 20) + COLOR 250 250 250 + END + CLASS + NAME "mildly interesting" + EXPRESSION ([pixel] > 20 AND [pixel] < 1000) + COLOR 255 0 0 + END + CLASS + NAME "very interesting" + EXPRESSION ([pixel] >= 1000) + COLOR 0 255 0 + END +END + + + +-- displaying raster with standard raster options and a where clause +LAYER + NAME soil_survey2009 + TYPE raster + STATUS ON + DATA "PG:host=localhost port=5432 dbname='somedb' user='someuser' password='whatever' schema='someschema' table='cooltable' where='survey_year=2009'" + PROCESSING "NODATA=0" + PROCESSING "SCALE=AUTO" + #... other standard raster processing functions here + #... classes are optional but useful for 1 band data +END + + + + +