[mapserver-users] How accessing Postgis Raster with MapServer
Paolo Corti
pcorti at gmail.com
Tue Mar 13 15:38:43 PDT 2012
On Tue, Mar 13, 2012 at 10:34 PM, Andrea Peri <aperi2007 at gmail.com> wrote:
> Hi,
> I'm try-ing to access a postgis raster using mapserver trunk,
> but it don't seem work.
>
> I don't understand if the problem is on the postgis raster or in the mapfile
> settings.
>
> So I like to know if this mapfile setting is ok to call a postgis raster
> I use this mapfile settings:
>
> The table ofc10k_single_2010 has only 1 raster loaded with this call:
>
> raster2pgsql -s 3003 -l 3 -C -e -Y -I -M 216100_2010.tif -F -f rast -d -t
> 100x100 my_schema.ofc10k_single_2010 > ofc10k_single_2010.sql
>
> The gdal available is gdal 1.9.0.
>
> The mapfile layer section is this:
>
> LAYER
> NAME "ofc10k_single"
> STATUS ON
> EXTENT 1559445 4921905 1566395 4927805
> TYPE raster
> CONNECTIONTYPE ogr
> DATA "PG:host='localhost' port='5432' dbname='my_database'
> user='postgres' password='my_password' schema='my_schema'
> table='ofc10k_single_2010' mode='2'"
> PROCESSING "NODATA=0"
> PROCESSING "SCALE=-100.5,100.5"
> PROCESSING "SCALE_BUCKETS=201"
> # ... other standard raster processing functions here
> PROJECTION
> "init=epsg:3003"
> END
> METADATA
> "wms_title" "OFC 1:10.000 single"
> "wms_srs" "EPSG:3003 EPSG:4326"
> END
> OFFSITE 255 255 255
> OPACITY 100
> END
>
> Thx for any hint.
>
Hi Andrea
for sure you have to remove the line with the CONNECTIONTYPE set to
ogr (that is only for vectorial layers [0]).
The rest looks fine to me, but I cannot test it right now.
BTW, have you read this [1] faq?
ciao
P
[0] http://www.mapserver.org/input/vector/ogr.html
[1] http://www.postgis.org/documentation/manual-svn/RT_FAQ.html#id3059359
--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti
More information about the MapServer-users
mailing list