Hello.
I have a method that convert MathTransform to AffineTransform if
conditions are met.
public static AffineTransform2D createAffineTransform(MathTransform t)
{
log.debug("{}", t);
if(t instanceof LinearTransform)
{
AffineTransform2D t2d = new
AffineTransform2D(((LinearTransform)
t).getMatrix());
log.debug("{}", t2d);
return t2d;
}
throw new RuntimeException("Cannot convert MathTransform to
LinearTransform");
}
But transformation result is quite different for MathTransform and
returned AffineTransform for same position
(0,0) ==>
AffineTransform: [1.9458968000328103, 102.34457284971506]
MathTransform: [6.656101900490285, 102.34457284971506]
and the debug output from createAffineTransform() is following:
PARAM_MT["Affine",
PARAMETER["num_row", 3],
PARAMETER["num_col", 3],
PARAMETER["elt_0_0", 0.33035550470236696],
PARAMETER["elt_0_1", 0.0033956143607498375],
PARAMETER["elt_0_2", -2.54640260400015],
PARAMETER["elt_1_0", 0.0020925718915183666],
PARAMETER["elt_1_1", 0.5139233766079051],
PARAMETER["elt_1_2", -52.611196828163315]]
0.330356 -2.546403 0.513923
0.003396 0.002093 -52.611197
0.000000 0.000000 1.000000
What am I doing wrong?
Thanks in advance.
--
YoungJoon Chun <[EMAIL PROTECTED]>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users