[postgis-users] Mapserver connection to Postgis Raster

Paragon Corporation lr at pcorp.us
Wed Jun 1 21:58:49 PDT 2011


Virginia,
 
Sorry sent too soon.  Didn't read the last part about PostGIS 1.5.  I guess
that means you are probably using the old wkt raster.  
 
Unfortunately GDAL 1.6 has no functionality to render PostGIS raster in
Mapserver.  It can be only used to load raster data in PostGIS .  I'll put a
note in the FAQ about that.
 
The PostGIS Raster GDAL driver rendering  was introduced in GDAL 1.7 and
further enhanced in 1.8 and Jorge and Bborie and improving on the GDAL
driver further.
 
So sadly what you are trying to do is not possible with the versions you
have :(
 
Regina

  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Virginia
Maffei
Sent: Wednesday, June 01, 2011 8:00 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Mapserver connection to Postgis Raster


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/20110602/b5ee45ef/attachment.html>


More information about the postgis-users mailing list