Hi,
I’m trying to set a ArcSDE Raster (9.2) store in Geoserver 2.0.2 and I’m getting the following error from the Add Store page:
Could not list layers for this store, an error occurred retrieving them: Unable to acquire test coverage for format:ArcSDE Raster
I’ve checked out the code and looked at it.
In the CatalogBuilder class there is some code that generates a fake small GridCoverage to retrieve meta information which is added to the parameters Map send to the reader.
(~Line 651-653)
//build the corresponding envelope
final MathTransform gridToWorldCorner = reader.getOriginalGridToWorld(PixelInCell.CELL_CORNER);
GeneralEnvelope testEnvelope =CRS.transform(gridToWorldCorner,new GeneralEnvelope(testRange.getBounds()));
Then on ~Line 660 the reader.read method is called:
//try to read this coverage
gc = (GridCoverage2D) reader.read(CoverageUtils.getParameters(readParams, parameters,
true));
gc will be null which explain the error: ’ Unable to acquire test coverage for format:ArcSDE Raster’
The reader called is : ArcSDEGridCoverage2DReaderJAI
From what I can tell, findMatchingRasters (Line 205) is empty because RasterUtils.findMatchingRasters is returning an empty list.
The following condition is always false therefore nothing will be added to the list matchingRasters:
(RasterUtils, line 520)
if (requestedEnvelope.intersects(gridEnvelope, edgesInclusive)) {
Basically, there is no data available for the requestedEnvelope in ArcSDE.
My understanding is that the original envelope is calculated using the rasterInfo. This envelope is something like the smallest rectangle that can contain all the raster data. There is good chance that there some area without data which is the case for the test envelope.
The test envelope is using the top left corner to generate the bounding box. The problem is that it can’t be guarantee that there is data for this envelope for every single store.
If I hardcode the test envelope to a value where I know there is data, it’s working just fine.
-
Is there any possible workaround ?
-
Is it something wrong in ArcSDE (which I’m not an expert) ?
-
Is Geoserver expecting to get data for every area of the envelope ?
Thanks
Mathieu Lavoie