As reported in this mail thread:
it would be very useful to relax the current bound checks on MapProjection (line ...) as they are breaking rendering in at least two applications depending on GeoTools (GeoServer and uDig).
- add a new hint to ask for transform leniency
- use the current "lenient transform" hint to act on bound checks as well
The latter is probably the easiest way, but has backwards compatibility issues. At the moment the CRS.findMathTransform(from, to , lenient) javadoc states:
Most datastore and rendering code sets lenient to true in order to get a best effort behaviour, so the change proposed above would be consistent with the current intended usage, but not fully with the javadoc (thought it can be argued that it doesn't say anything about exception being thrown either, so the current behaviour is not specified in the javadocs either?).