[mapserver-users] How accessing Postgis Raster with MapServer
Andrea Peri
aperi2007 at gmail.com
Tue Mar 13 16:35:23 PDT 2012
Hi Paolo,
thx for hint.
I remove the
ConnectionType 'ogr'
and set the NODATA ans SCALE as suggested in the faq:
NAME "ofc10k_single"
STATUS ON
EXTENT 1559445 4921905 1566395 4927805
TYPE raster
DATA "PG:host='localhost' port='22002' dbname='my_database'
user='postgres' password='my_password' schema='my_schema'
table='ofc10k_single_2010' mode='2'"
PROCESSING "NODATA=0"
PROCESSING "SCALE=AUTO"
Unfortunately it still don't work correctly.
I set debug to max level and see this error report.
(seem the NODATA=0 was not supported ?)
....
[Wed Mar 14 02:18:43 2012].423056 msDrawMap(): rendering using outputformat
named png (AGG/PNG).
[Wed Mar 14 02:18:43 2012].426271 msDrawMap(): WMS/WFS set-up and query,
0.003s
[Wed Mar 14 02:18:43 2012].430485 msDrawMap(): Layer 0 (credits), 0.004s
[Wed Mar 14 02:18:43 2012].586938 msDrawRasterLayerLow(ofc10k_single):
entering.
[Wed Mar 14 02:20:13 2012].461265 LoadGDALImage(ofc10k_single): NODATA
value 0 in GDAL
file or PROCESSING directive largely ignored. Not yet fully supported for
unclassified scaled data. The NODATA value is excluded from auto-scaling
min/max computation, but will not be transparent.
[Wed Mar 14 02:20:13 2012].463071 LoadGDALImage(ofc10k_single): NODATA
value 0 in GDAL
file or PROCESSING directive largely ignored. Not yet fully supported for
unclassified scaled data. The NODATA value is excluded from auto-scaling
min/max computation, but will not be transparent.
[Wed Mar 14 02:20:13 2012].464870 LoadGDALImage(ofc10k_single): NODATA
value 0 in GDAL
file or PROCESSING directive largely ignored. Not yet fully supported for
unclassified scaled data. The NODATA value is excluded from auto-scaling
min/max computation, but will not be transparent.
[Wed Mar 14 02:20:13 2012].468391 msDrawMap(): Layer 5 (ofc10k_single),
90.038s
[Wed Mar 14 02:20:13 2012].469876 msDrawMap(): Drawing Label Cache, 0.001s
[Wed Mar 14 02:20:13 2012].469901 msDrawMap() total time: 90.048s
[Wed Mar 14 02:20:13 2012].486769 msSaveImage(stdout) total time: 0.017s
[Wed Mar 14 02:20:13 2012].487698 mapserv request processing time
(msLoadMap not incl.): 90.066s
[Wed Mar 14 02:20:13 2012].487722 msFreeMap(): freeing map at 0x1438770.
[Wed Mar 14 02:19:44 2012].369692 msDrawMap(): rendering using outputformat
named png (AGG/PNG).
[Wed Mar 14 02:19:44 2012].371084 msDrawMap(): WMS/WFS set-up and query,
0.001s
[Wed Mar 14 02:19:44 2012].373235 msDrawMap(): Layer 0 (credits), 0.002s
[Wed Mar 14 02:19:44 2012].376380 msDrawRasterLayerLow(ofc10k_single):
entering.
[Wed Mar 14 02:21:13 2012].801136 LoadGDALImage(ofc10k_single): NODATA
value 0 in GDAL
file or PROCESSING directive largely ignored. Not yet fully supported for
unclassified scaled data. The NODATA value is excluded from auto-scaling
min/max computation, but will not be transparent.
[Wed Mar 14 02:21:13 2012].803247 LoadGDALImage(ofc10k_single): NODATA
value 0 in GDAL
file or PROCESSING directive largely ignored. Not yet fully supported for
unclassified scaled data. The NODATA value is excluded from auto-scaling
min/max computation, but will not be transparent.
[Wed Mar 14 02:21:13 2012].804759 LoadGDALImage(ofc10k_single): NODATA
value 0 in GDAL
file or PROCESSING directive largely ignored. Not yet fully supported for
unclassified scaled data. The NODATA value is excluded from auto-scaling
min/max computation, but will not be transparent.
[Wed Mar 14 02:21:13 2012].808087 msDrawMap(): Layer 5 (ofc10k_single),
89.435s
[Wed Mar 14 02:21:13 2012].808290 msDrawMap(): Drawing Label Cache, 0.000s
[Wed Mar 14 02:21:13 2012].808302 msDrawMap() total time: 89.439s
[Wed Mar 14 02:21:13 2012].821898 msSaveImage(stdout) total time: 0.013s
[Wed Mar 14 02:21:13 2012].821997 mapserv request processing time
(msLoadMap not incl.): 89.453s
[Wed Mar 14 02:21:13 2012].822012 msFreeMap(): freeing map at 0x762770.
....
2012/3/13 Paolo Corti <pcorti at gmail.com>
> 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
>
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120314/95a21a2f/attachment.htm>
More information about the MapServer-users
mailing list