Jess Eichar has raised an issue with DefaultEngineeringCRS.GENERIC_2D. Basically he would like any call to CRS.findMathTransform(sourceCRS, targetCRS) to return the identity transform if at least one argument is a GENERIC_2D.
The current behavior is "go as far as possible. When you can't transform further, return the chain you got so far rather than throwing an exception". The rational behind this behavior is that GENERIC_2D is not UNKNOWN_2D: it explicitly defines a cartesian space and axis in (x,y) order and in metres: http://javadoc.geotools.fr/snapshot/org/geotools/referencing/crs/DefaultEngineeringCRS.html#GENERIC_2D So if a conversion from foots to metres is possible, if axis swapping from (y,x) to (x,y) order is possible, or if some transformation from non-cartesian space to a cartesian space is possible, we problably expect those transformations to be applied given the current GENERIC_2D definition (I'm not sure they are properly performed in current implementation - the behavior reported by Jesse looks like a bug - but this is the idea). So if a CRS is totally unknown, GENERIC_2D is probably not appropriate since it implies that you known that the CRS is cartesian, etc. How peoples use GENERIC_2D? Is it in the sense ot "totally unknown CRS", or in the sense of "unknown CRS having (x,y) axis order in metres"? Martin ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
