Hi,
today I had a boring hour and implemented the Winkel Tripel
projection, which apparently has been chosen as the best
world-wide projection by the National Geographic some 12
years ago.

Adding the code was easy enough, but there is a catch:
the transform is not easily inverted.

Now, MathTransform.inverse() throws a NoninvertibleTransformException,
but MapProjection, its subclass, removed that throws because
so far there was no non invertible projection.

So in order to apply the patch I have to add back that
throws... which will break anyone directly using
MapProjection.inverse().

I believe the likeliness of someone using that direct
call is low, as CRS.findMathTransform returns a generic
MathTransform (which could be a concatenation of
MapProjection with something else).

In any case, it's an API break. How to deal with that?

Evil plan:
- on 2.6.x we throw an unsupported operation exception
   that wraps the non invertible one
- on trunk we actually make the code throw the
   NonInvertibleTransformException

Opinions?

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to