Hi list,
while debugging the GridCoveragereRenderer (2.3.x), I noticed that the
isScaleTranslate method return false.
With a MathTransform having a rotation of -0.0 (such a number is probably
due to Java double representation/precision) the method isScaleTranslated
return false.
The actual code is:
private boolean isScaleTranslate(MathTransform transform) {
if(!(transform instanceof AffineTransform))
return false;
final AffineTransform at = new AffineTransform((AffineTransform)
transform);
XAffineTransform.round(at, EPS);
final double rotation=XAffineTransform.getRotation(at);
return rotation>0;
}
A -0.0 rotation let return false.
I think we should change "return rotation>0" in "return
(Math.abs(rotation)==0)"
which should drop the minus sign.
PS: If this method checks if the transformation is a pure scale/translate
instance, why a transformation with a positive rotation does return true?
If this is a bug, I can open a JIRA Task if you want. (In this case, what
priority should I set?)
Thank you very much
--
Best Regards,
Daniele Romagnoli
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel