[postgis-users] Mapserver connection to Postgis Raster

Virginia Maffei vmaffei at gmail.com
Wed Jun 1 16:59:57 PDT 2011


Hi, i'm new at this and i'm trying to connect to postgis raster in the
mapfile.
I loaded a tif file into postgis raster database with the raster2pgsql.py
script. It created a table with 2 fields: rid and rast.
In the mapfile i added the connection like it specifies in the postgis
raster FAQ but it doesn't displays anything.

This is my mapfile:

MAP
  IMAGETYPE      PNG24
  EXTENT         366582.2901411663 6127927.100382689 857582.2901411663
6670927.100382689
  SIZE           491 543
  SHAPEPATH      "../data"

  LAYER # MODIS raster layer begins here
    NAME         modis
TYPE         RASTER
 STATUS       ON
 DATA "PG:host=localhost port=5432 dbname='postgis' user='postgres'
password='postgres' schema='public' table='HumedadDeExtincion'"
    PROCESSING "NODATA=0"
PROCESSING "SCALE=AUTO"
 PROCESSING "SCALE_BUCKETS=201"
    PROCESSING   "BANDS=1"
    OFFSITE      71 74 65
  CLASS
NAME "red"
EXPRESSION ([pixel] < 10)
COLOR 255 0 0
END
CLASS
NAME "green"
EXPRESSION ([pixel] >= 10 AND [pixel] < 15000 )
COLOR 0 255 0
END
CLASS
NAME "blue"
EXPRESSION ([pixel] >= 15000 )
COLOR 0 255 0
END
   END # MODIS raster layer ends here

  # End of LAYER DEFINITIONS -------------------------------

END # All map files must come to an end just as all other things must come
to...


I have gdal 1.6 , postgis 1.5 and ms4w with mapserver 5.6.6

We cant see the tiff file on the browser, it only appears a white image.
We did try with the tif without the database connection an it works.

Could you help us?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110601/3a372d5e/attachment.html>


More information about the postgis-users mailing list