Martin Desruisseaux wrote:
> It is an attempt of generalization of the old
> GridCoverage2D.geophysics(boolean)
> method, which was bad because it didn't recognized the needs for photographic
> images.
>
Okay; yes I am starting to see how this makes sense.
> The API change is tiny: deprecate "geophysics(boolean)" and propose the more
> generic "view(ViewType)" method instead, thats all!! So this is a compatible
> change on API point of view.
>
Right; and on this list we have the implementors to worry about; can an
abstract class help with the transition for implementors?
I am thinking along the lines of:
abstract AbstractGridCoverage2D implements GridCoverage2d {
GridCoverage2D geophysics(boolean isGeophysics){
return view( isGeophysics ? ViewType.GEOPHYSICS : ViewType.NATIVE };
}
GridCoverage2D view(ViewType type){
if( ViewType.GEOPHYSICS == type ){
return geophysics( true );
}
else if( ViewType.NATIVE == type ){
return geophysics( false );
}
else {
return null; // requested type of view not supported!
}
}
The existing implementations that implement geophysics will be "happy";
the existing client code that uses geophysics will be happy. And as
implementations implement the view method they can retire their support
for the geophysics method.
> While the change is compatible on API point of view, it has a lot of
> implication
> under the hood which are likely to spread over every image operations
> performed
> by the coverage module. Those implications are invisible to the users and the
> coverage module behavior should stay the same for most "standard" use, but the
> behavior may change in some corner cases.
>
> I will try to elaborate more on those views in the wiki page...
>
Thanks Martin; communication is one area where I cannot help you very much.
Jody
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel