[mapserver-users] How to render raster data using Oracle Georaster?
Ivan
ivan.lucena at pmldnet.com
Thu Dec 31 05:59:03 PST 2009
xxj wrote:
> Hi folks,
>
> Is Oracle Georaster supported by MapServer?
>
> I am using MapServer5.6.0 and can render vector data using Oracle
> successfully. But when I was trying raster data using Oracle database, the
> following errors happens.
>
> Errors:
>
> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> <!DOCTYPE ServiceExceptionReport SYSTEM
> "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
> <ServiceExceptionReport version="1.1.1">
> <ServiceException>
> msDrawMap(): Image handling error. Failed to draw layer named
> 'bluemarble'.
> msDrawRaster(): Unable to access file.
> georaster:wz/wz at orclat18,sf_rasters,georaster,georid=101 using full path
> georaster:wz/wz at orclat18,sf_rasters,georaster,georid=101
> </ServiceException>
> </ServiceExceptionReport>
>
> My layer definition in mapfile is as following:
>
> LAYER
> NAME bluemarble
> TYPE raster
> STATUS ON
> #CONNECTIONTYPE oraclespatial
> #CONNECTION "wz/wz at orclat18"
> #DATA "geor:wz/wz at orclat18,student_rdt_01,id=1"
> DATA "georaster:wz/wz at orclat18,sf_rasters,georaster,georid=101"
> #DATA drgncimq1926.tif
> #DATA "georaster from sf_rasters using srid 8307"
> #DATA "GEOR:temporary.vrt"
> CLASS
> EXPRESSION ([pixel] >= 0 AND [pixel] <= 1000)
> STYLE
> COLOR 255 0 0
> END
> END
> METADATA
> WMS_TITLE "bluemarble"
> WMS_ABSTRACT "bluemarble."
> WMS_SRS "EPSG:4326"
> END
> END
>
> I am very sure that GDAL and GeoRaster are compiled into MapServer and well
> configured for the belows are the output about them.
>
> Output of mapserv:
>
> [oracle at ts cgi-bin]$ ./mapserv -v
> ./mapserv: /usr/lib/libxml2.so.2: no version information available (required
> by ./mapserv)
> MapServer version 5.6.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=WBMP OUTPUT=SVG
> SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WCS_SERVER INPUT=EPPL7 INPUT=ORACLESPATIAL INPUT=OGR INPUT=GDAL
> INPUT=SHAPEFILE
>
> Output of gdal_translate:
>
> [oracle at ts cgi-bin]$ gdal_translate |grep Geo
> GTiff: GeoTIFF
> GeoRaster: Oracle Spatial GeoRaster
>
> I have ever tried to confirm that if gdal is OK by executing the command of
> "gdal_translate -of gtiff
> geor:wz/wz at orclat18,sf_rasters,georaster,georid=101 bluemarble.tiff -outsize
> 100% 100%"
> in the command line. And found it's OK, the expected picture file was
> returned.
>
> I am so confused by the errors above now! So I wonder how to render raster
> data with Oracle and GDAL on MapServer?
>
> Thanks!
>
Hi,
I am as confused as you. There was a piece of code in Mapserver that wrongly assume that a raster
data is always a file. I thought that I reported that problem and that was fixed. See my SVN DIFF
for details:
{{{
$ svn diff
Index: mapwcs.c
===================================================================
--- mapwcs.c (revision 9444)
+++ mapwcs.c (working copy)
@@ -2047,7 +2047,7 @@
/* TODO: need to set resolution */
cm->bandcount = GDALGetRasterCount( hDS );
-
+
if( cm->bandcount == 0 ) {
msReleaseLock( TLOCK_GDAL );
msSetError( MS_WCSERR, "Raster file %s has no raster bands. This cannot be used in a
layer.", "msWCSGetCoverageMetadata()", layer->data );
Index: mapstring.c
===================================================================
--- mapstring.c (revision 9444)
+++ mapstring.c (working copy)
@@ -665,7 +665,7 @@
if( fp == NULL )
{
strcpy( szReturnPath, path );
- return NULL;
+// return NULL;
}
else
fclose( fp );
@@ -692,7 +692,7 @@
if( fp == NULL )
{
strcpy( szReturnPath, path2 );
- return NULL;
+// return NULL;
}
else
fclose( fp );
}}}
Regards,
Ivan
More information about the MapServer-users
mailing list