Get Image by url in database
patrice canonici
patrice.canonici at GMAIL.COM
Thu Jul 19 11:11:49 PDT 2007
Hi all
fist, know that It is my first message on this list and I'm working
for the first time with MapServer.
I'm trying to configure WMS MapServer. I'm using a PostGIS database to
store polygon, called datastrip. For each datastrip I have an image,
the path to the image is store into an other table (image).
an image entry refer a datastrip.
I successfully write the mapfile to get datastrip. But now, I would
like to get image for datastrip.
I tryed the following bloc into the mapfile, but it doesn't work :
LAYER
NAME "image"
CONNECTIONTYPE postgis
CONNECTION "user=testeur dbname=pocdb host=localhost"
TYPE RASTER
DATA "imagename from (SELECT i.folder_url || '\' || i.filename as
imagename from datastrip d, image i WHERE
d.datastrip_id=i.datastrip_id)"
END
it seams that the meaning to get the data information (i.e. db
connection) is not take n into account. the return message is
something like "unable to acces file imagename from (SELECT
i.folder_url || '\' || i.filename as imagename from datastrip d, image
i WHERE d.datastrip_id=i.datastrip_id)"
I set the SHAPEPATH attribute, to complete the image path (the path
into db is relative to the SHAPEPATH value)
I try to replace DATA value by "foo.gif", and it works.
Is there a way to get the image url from my db ? without catch the
request, get the BBOX, make an interest with it and the datastrip
table and finally get image for each datastrip on this BBOX, write on
the fly a mapfile ..etc ...
thanks
Patrice
More information about the MapServer-users
mailing list