Answer here?

http://mapserver.gis.umn.edu/docs/howto/wms_time_support/#example-of- wms-t-with-postgis-tile-index-for-raster-imagery

On 22-Oct-07, at 2:28 PM, Ryan Ollerenshaw wrote:

On 10/22/07, Ryan Ollerenshaw <[EMAIL PROTECTED]> wrote:
How can i use a Postgres database to display raster images with
Mapserver?  There are lots of examples on display features this way
and using a gdaltindex to create a shapefile but i cant find any that
talk about using a database to store raster images. Here is what i am
currently trying:

LAYER
  NAME "stereo_simp"
  TYPE RASTER
  PROCESSING "SCALE=AUTO" #rescale 16-bit image to 8-bit
  STATUS on
  CONNECTION "host=localhost dbname=test user=postgres"
  CONNECTIONTYPE POSTGIS
  DATA "location FROM stereo"
  TILEINDEX "stereo" #the table name
  TILEITEM "location" #column that contains the path to the image
END

if i just try and display the image directly it works just fine:

LAYER
  NAME "stereo_simp"
  TYPE RASTER
  PROCESSING "SCALE=AUTO" #rescale 16-bit to 8-bit
  STATUS on
  DATA "/hiview/products/data/20070929_000600_14euA_171_16_gdal.tif"
END


Sorry i should have been more clear on my post I do not want to store
the images directly in the database, what i am trying to do is store
the location of the image in the database and use mapserver to read
this location column and display the image.  This works fine when
using gdaltindex when gdal generates the dbf file for example using
this technique:

LAYER
  NAME "stereo_simp"
  TYPE RASTER
  PROCESSING "SCALE=AUTO" #rescale 16-bit to 8-bit
  STATUS on
  TILEINDEX "images.shp"
  TILEITEM "location"
END

but when i try to use Postgres as the TILEINDEX this does not work, ie:

LAYER
  NAME "stereo_simp"
  TYPE RASTER
  PROCESSING "SCALE=AUTO" #rescale 16-bit to 8-bit
  STATUS on
  CONNECTION "host=localhost dbname=test user=postgres"
  CONNECTIONTYPE POSTGIS
  TILEINDEX "the_geom FROM stereo"
  TILEITEM "location"
END

  any ideas on what i am doing wrong?

Reply via email to