Hey all,
There's a peculiar difference between 1.5.x and trunk in GetMapResponse.java
It's small, but really significant, and I wondered why it's done this way in trunk, rather than the way it was done in 1.5.x.
Here's the difference:
1.5.x (line 287):
layer = new DefaultMapLayer(
DataUtilities.wrapGcReader(
reader,
CoverageUtils.getParameters(params, layers[i].getCoverage().getParameters())
),
style);
trunk (line 297):
layer = new DefaultMapLayer(
CoverageUtilities.wrapGc(
reader.read(CoverageUtils.getParameters(params,layers[i].getCoverage().getParameters()))
),
style);
The difference is that in 1.5.x, the map is set up with a GridCoverageREADER, which is then read from at map-generation time.
In trunk, the reader is "pre-read" (with bum params, unfortunately) and then the already-rendered GridCoverage is passed in as the 'thing to draw', to the map setup doc.
This throws a bit of a wrench in my ArcSDE raster implementation, as the read() method (called explicitly in the trunk way above, but implicitly by the GridCoverageRenderer in the 1.5.x way) expects to be passed a properly constructed READ_GRIDGEOMETRY2D parameter with the extent and bounding box in it. These aren't present in the trunk method (layers[i].getCoverage().getParameters() doesn't seem to have the right thing in it.
Is there a reason for the difference in approach? Should I look at how CoverageUtils.getParameters() is feeding the read() call?
Just curious!
thanks,
--saul
Farber, Saul (ENV) ha scritto:
Hey all,
There's a peculiar difference between 1.5.x and trunk in
GetMapResponse.java
It's small, but really significant, and I wondered why it's done this
way in trunk, rather than the way it was done in 1.5.x.
Here's the difference:
1.5.x (line 287):
layer = new DefaultMapLayer( DataUtilities.wrapGcReader( reader, CoverageUtils.getParameters(params,
layers[i].getCoverage().getParameters()) ), style);
trunk (line 297):
layer = new DefaultMapLayer( CoverageUtilities.wrapGc( reader.read(CoverageUtils.getParameters(params,layers[i].getCoverage().getParameters()))
), style);
The difference is that in 1.5.x, the map is set up with a
GridCoverageREADER, which is then read from at map-generation time.
In trunk, the reader is "pre-read" (with bum params, unfortunately)
and then the already-rendered GridCoverage is passed in as the 'thing
to draw', to the map setup doc.
Trunk is definitely broken. Please note using the
reader is a (very significant) performance optimization, but it's
not "more correct" than the other.
svn blame points to Gabriel trying to make Geoserver compile again
after the coverage changes where forward ported to trunk whilst
the required classes weren't still ported over from gt2 2.3.x to
gt2 trunk. I opened an issue to track this:
http://jira.codehaus.org/browse/GEOS-1000
Wow, GEOS-1000!!!! Do I win a puppet?
This throws a bit of a wrench in my ArcSDE raster implementation, as
the read() method (called explicitly in the trunk way above, but
implicitly by the GridCoverageRenderer in the 1.5.x way) expects to
be passed a properly constructed READ_GRIDGEOMETRY2D parameter with
the extent and bounding box in it. These aren't present in the trunk
method (layers[i].getCoverage().getParameters() doesn't seem to have
the right thing in it.
Hum, not sure what's the issue, but afaik your read methods should
return the full coverage if no parameters are provided. If not, that's a bug as far as I can tell.
Cheers
Andrea