Wait a minute! Maybe we can solve this issue by delegating in the layer of functionality just under the exposed API.
For example the transformation method might look like this: transformCoordinate(String argSourceSRS, String argDestinationSRS, double argXOrdinate, double argYOrdinate, double argZOrdinate, boolean argZOrdinateType) { /* If the transformation is simple, do something here. */ if(isSimpleTransformationPossible == true) { doSimpleTransformation(String argSimpleTransformationType, String argSourceSRS, String argDestinationSRS, double argXOrdinate, double argYOrdinate, double argZOrdinate, boolean argZOrdinateType) } else { doComplexTransformation(String argSourceSRS, String argDestinationSRS, double argXOrdinate, double argYOrdinate, double argZOrdinate, boolean argZOrdinateType) } } In this case we would need to define not one, but two interfaces in our exposed API. Something like ComplexSpatialReferenceTransformation and SimpleSpatialReferenceTransformation. (Or ComplexCoordinateOperation and SimpleCoordinateOperation if you like.) We can set up some rules that would allow the client code to determine if a simple transformation is possible. This might be as simple as a method that accepts the two spatial reference system identifiers or codes and returns a boolean indicating if a simple transformation is possible. Or maybe it returns the simple transformation itself. If a simple transformation is not possible, we fall back on the interface that converts to a common "pivot" geographic spatial reference system. This is a more complex than I wanted, but it might be a workable compromise. What do you guys think? SS On 9/10/07, Michaël Michaud <[EMAIL PROTECTED]> wrote: > Paul Austin a écrit : > > >Michael, > > > >I agree with all you said. I guess my statement there was regarding a > >particular type of CoordinateOperation. > > > > > So we are on the same page as Landon said ;-) > > >Paul > > > >Michaël Michaud wrote: > > > > > >>Paul Austin a écrit : > >> > >> > >> > >> > >>>Landon, > >>> > >>>Agreed each CoordinateOperation class should only know how to go in > >>>either the direction Geographics->ProjectedSystem or > >>>ProjectedSystem->Geographics. It should not need to know about any other > >>>systems. > >>> > >>> > >>> > >>> > >>> > >>Coordinate operations are not just Geographics->Projected and > >>Projected->Geographics. This is only the projection part (first and last > >>operation of Stefan's transformation chain). > >>Many operations involve a datum change. When you go from a local datum > >>to wgs84 for example, you must consider that the new coordinate system > >>has another origin, another orientation, and the ellipsoid you will use > >>to calculate lon and lat has another shape ! This transformation has no > >>common point with a projection, but most people do not differentiate > >>both operations. > >>If you want to apply the pivot principle, you have to say : each > >>CoordinateReferenceSystem has to know how to go from and to Geocentric > >>WGS84, but again, it may be much calculations for cases where only one > >>local datum is involved. > >> > >>Michael > >> > >> > >> > >> > >>>Paul > >>> > >>>Sunburned Surveyor wrote: > >>> > >>> > >>> > >>> > >>> > >>>>Paul wrote: "My vision for end user code. > >>>> > >>>>JtsTransform transform = > >>>>JtsTransformFactory.createCoordinateConversion(3005, 26910);" > >>>> > >>>>I like it! > >>>> > >>>>My concerns are about how the layer underneath this works. I think a > >>>>system where the steps necessary for the transformation are left to > >>>>the implementer of a projection and not the code provided with the "to > >>>>and from" spatial reference systems is the best. > >>>> > >>>>Here is another way of saying it: In an ideal system the code > >>>>performing the actual transformation should have no idea of what the > >>>>eventual destination spatial reference system is. It should only need > >>>>to know how to get a coordinate from itself to the pivot spatial > >>>>reference system. > >>>> > >>>>SS > >>>> > >>>>On 9/10/07, Paul Austin <[EMAIL PROTECTED]> wrote: > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>Landon, > >>>>> > >>>>>My vision for end user code. > >>>>> > >>>>>JtsTransform transform = > >>>>>JtsTransformFactory.createCoordinateConversion(3005, 26910); > >>>>> > >>>>>Paul > >>>>> > >>>>>------------------------------------------------------------------------- > >>>>>This SF.net email is sponsored by: Microsoft > >>>>>Defy all challenges. Microsoft(R) Visual Studio 2005. > >>>>>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >>>>>_______________________________________________ > >>>>>Jump-pilot-devel mailing list > >>>>>Jump-pilot-devel@lists.sourceforge.net > >>>>>https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>------------------------------------------------------------------------- > >>>>This SF.net email is sponsored by: Microsoft > >>>>Defy all challenges. Microsoft(R) Visual Studio 2005. > >>>>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >>>>_______________________________________________ > >>>>Jump-pilot-devel mailing list > >>>>Jump-pilot-devel@lists.sourceforge.net > >>>>https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>------------------------------------------------------------------------- > >>>This SF.net email is sponsored by: Microsoft > >>>Defy all challenges. Microsoft(R) Visual Studio 2005. > >>>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >>>_______________________________________________ > >>>Jump-pilot-devel mailing list > >>>Jump-pilot-devel@lists.sourceforge.net > >>>https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>------------------------------------------------------------------------- > >>This SF.net email is sponsored by: Microsoft > >>Defy all challenges. Microsoft(R) Visual Studio 2005. > >>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >>_______________________________________________ > >>Jump-pilot-devel mailing list > >>Jump-pilot-devel@lists.sourceforge.net > >>https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >> > >> > >> > > > > > > > >------------------------------------------------------------------------- > >This SF.net email is sponsored by: Microsoft > >Defy all challenges. Microsoft(R) Visual Studio 2005. > >http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >_______________________________________________ > >Jump-pilot-devel mailing list > >Jump-pilot-devel@lists.sourceforge.net > >https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel