[Java-collab] Re: [Geotools-devel] GeoTools moving forward

Sunburned Surveyor sunburned.surveyor at gmail.com
Fri Oct 10 11:26:02 EDT 2008


GeoTools Developers,

I'd like to share some thoughts on the referencing module. I'm
wondering if this new situation that has developed would be an
opportunity to introduce a common interface that could be used for
coordinate transformations. After all, from a client code
persepective, the process can be very simple. The client code gives
the interface a source crs, a destination crs, and 2 double values for
the x any y coordinate being transformed, and the interface returns 2
new double values representing the transformed coordinate.

We could then implement the interface using Martin's code in GeoTidy,
but would also be able to plug-in other crs transformation code as
needed.

For this interface to be the most flexible, I would suggest we stay
away from high-level objects, and instead used basic data types and
simple objects whenever possible. Since there are a lot of different
ways you can identify a CRS we could pass this information to the
interface as a String, and allow the interface implementation to
define the crs identifier formats that are supported.

Maybe there is already an interface like this in GeoAPI?

I was thinking it might look like the following:

public abstract void setSourceCrs(String argSourceCrs);

public abstract void setDestinationCrs(String argDestinationCrs);

public abstract double[] transformCoordinate(double[] coordinate);

Using this approach would free Martin to pursue whatever modifications
he wished, while allowing the the rest of the GeoTools programmers the
freedom to provide their own implementation of the interface (I might
be interested in a deegree implementation) and would also allow them
to choose the implementation that best fits their needs.

I'd be willing to maintain a module with such an interface, and to
work with Martin (if he was willing) to provide an implementation of
this interface that was plumbed to his GeoTidy code.

The Sunburned Survyeor


More information about the Java-collab mailing list