Ticket #3253 (closed defect: fixed)
Raster map can't render from a Oracle Spatial data source.
| Reported by: | xxj | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | high | Milestone: | 5.6 release |
| Component: | GDAL Support | Version: | unspecified |
| Severity: | normal | Keywords: | raster,oracle,spatial,georaster |
| Cc: | ilucena, EliL |
Description
Version:5.6.0, source code OS: Redhat Linux Database version:Oracle11gr1(Oracle Spatial included) Steps: 1.Install Oracle database into the server 2.Install the required library such as GDAL, libxml, curl and so on. 2.Configure Oracle GeoRaster? support into the MapServer. The followings are the output summary:
MapServer is now configured for
-------------- Compiler Info -------------
C compiler: gcc -O2 -fPIC -Wall C++ compiler: g++ -O2 -fPIC -Wall Debug: Generic NINT:
-------------- Renderer Settings ---------
OpenGL support: zlib support: -DUSE_ZLIB png support: palette rgba png support: jpeg support: iconv support: -DUSE_ICONV AGG support: -DUSE_AGG Cairo (SVG,PDF) support: Ming(flash) support: PDFLib support:
-------------- Support Libraries ---------
Proj.4 support: -DUSE_PROJ Libxml2 support: -DUSE_LIBXML2 FriBidi? support: Curl support: -DUSE_CURL FastCGI support: Threading support: GEOS support:
-------------- Data Format Drivers -------
native tiff support: PostGIS support: EPPL7 support: -DUSE_EPPL ArcSDE support: OGR support: -DUSE_OGR GDAL support: -DUSE_GDAL Oracle Spatial support: -DUSE_ORACLESPATIAL
-------------- OGC Services --------------
WMS Server: -DUSE_WMS_SVR WMS Client: -DUSE_WMS_LYR WFS Server: -DUSE_WFS_SVR WFS Client: -DUSE_WMS_LYR WCS Server: -DUSE_WCS_SVR SOS Server:
3.Compile MapServer and get the CGI executable application 4.Install Apache(the latest version from the official website) 5.Make all settings on Apache server including CGI folder, environment arguments(ORACLE_HOME, LD_LIBRARY_PATH and so on) 6.Create two map files. One(map_point_layer.map) is as the below:
MAP
NAME map_point_layer STATUS ON CONFIG "MS_ERRORFILE" "/home/oracle/mapserver.log" SIZE 600 600
# EXTENT 388107.634400379 5203120.88405952 500896.339019834 5310243.30613897
EXTENT -157.80423 21.31725 -71.017892 61.178368 IMAGETYPE PNG
PROJECTION
"init=epsg:4326"
END
WEB
IMAGEPATH "/tmp/" IMAGEURL "/tmp/"
END
LAYER NAME cities TYPE point STATUS ON CONNECTIONTYPE oraclespatial CONNECTION "mvdemo11g/mvdemo11g@orclat18" DATA "location from cities using srid 8307" CLASS
STYLE
SYMBOL 2 COLOR 255 0 0 POSITION CC
END
END
END
END
END
The other one(map_raster_layer.map) is this look:
MAP
NAME map_raster_layer STATUS ON CONFIG "MS_ERRORFILE" "/tmp/mapserver.log" SIZE 600 600 EXTENT 388107.634400379 5203120.88405952 500896.339019834 5310243.30613897 IMAGETYPE PNG WEB
IMAGEPATH "/tmp/" IMAGEURL "/tmp/"
END
PROJECTION
"init=epsg:4326"
END LAYER
NAME bluemarble TYPE RASTER STATUS ON DATA "georaster:wz/wz@orclat18,sf_rasters,georaster,georid=101" END
END
Both the two database connection are all right.
Problem: If trying to get a map with the map_raster_layer.map by sending a WMS request or using the tool of shp2img, errors happen. The errors are:
msDrawMap(): Image handling error. Failed to draw layer named 'bluemarble'. msDrawRaster(): Unable to access file. georaster:wz/wz@orclat18,sf_rasters,georaster,georid=101 using full path georaster:wz/wz@orclat18,sf_rasters,georaster,georid=101
If trying to get a map using the map_point_layer.map, everything is OK. The wanted picture can be rendered and obtained not only through a WMS request, but also the tool of shp2img.
If changing the data source in map_raster_layer.map from a Oracle connection to a local raster file, no errors occur and MapServer works well.
So may I assume that, if there is something wrong when MapServer deals with a raster Oracle data source? if MapServer always looks on a raster data source as a local file, but not a potential database connection?
BTW: I am not sure I have selected the right component. If not, please could someone help me to assign the ticket to the right one? Thanks!
