Ticket #497 (closed task: fixed)
[raster] Start testing displaying PostGIS raster with Mapserver
| Reported by: | robe | Owned by: | robe |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.0 |
| Component: | raster | Version: | trunk |
| Keywords: | Cc: |
Description
The good news is that I started to test wktraster in Mapserver and got something to show up and was in the right spot and about the right size. The bad news is I just got a black box where my raster should have been.
I suspect this is just user error on my part since I haven't tried displaying rasters in mapserver in a really long time. Couple of questions -- should the standard pixel syntax supposed to work. Was going to try that next. Also not sure how to create overlays -- I tried with my particular example and got some gdal2wktraster errors in line such and such. I presume will need this to improve speed.
I'm going to try next with a simpler image since the one I was using I got a black box too when using gdal_translate to export it out to jpeg.
Anyrate this is the connection string construct I used in case anyone is interested in trying. I presume that part is okay. The other stuff below I actually haven't tried yet, but copied from one of Frank W's examples. Should that syntax work okay or you don't know.
LAYER NAME maraster TYPE raster STATUS ON DATA "PG:host=localhost port=5432 dbname='postgis_in_action' user='postgres' password='whatever' schema='ch13' table='maraster'" PROCESSING "NODATA=500" PROCESSING "SCALE=-100.5,100.5" PROCESSING "SCALE_BUCKETS=201" CLASS NAME "red" EXPRESSION ([pixel] < 20) COLOR 255 0 0 END CLASS NAME "green" EXPRESSION ([pixel] >= 1000 and [pixel] < 2000) COLOR 0 255 0 END END
