Thanks Martin, that makes the degree value more clear. My 10 points with a degree value of 2 seem to provide decent results (as long as my points are spanned across most of the image) except for it being upside down. Perhaps I have screwed up my coordinates, I will try messing with them as you suggest. But maybe my error is clear to you when looking at them. Here are some example points:
dstCoords: [java.awt.Point[x=120,y=221], java.awt.Point[x=163,y=170], java.awt.Point[x=91,y=153], java.awt.Point[x=181,y=114], java.awt.Point[x=30,y=109], java.awt.Point[x=182,y=72], java.awt.Point[x=89,y=71], java.awt.Point[x=153,y=28], java.awt.Point[x=15,y=20], java.awt.Point[x=80,y=8]] srcCoords: [Point2D.Double[23.0699648202801, -33.705024437596194], Point2D.Double[36.52844268194099, -18.165338659183625], Point2D.Double[13.635155597672467, -12.337956492278911], Point2D.Double[43.04956082109626, 0.5655325915815257], Point2D.Double[-5.095715653092684, 2.2304989249828724], Point2D.Double[42.63331923774592, 13.469021675441963], Point2D.Double[13.496408403222354, 13.746516064342188], Point2D.Double[34.030993181838966, 27.759982703803523], Point2D.Double[-10.090614653296724, 29.841190620555206], Point2D.Double[10.02772854196955, 33.587364870708235]] Graham. Martin Desruisseaux wrote: > Graham Davis a écrit : > >> I am using the value of 2 degrees with 10 points. Is there documentation >> anywhere that explains the variance of using higher/lower degrees with >> more/less points? >> > > Not as fas as I know. The javadoc for the WarpTransform2D constructor gives > the > minimal amount of points, but empirical experiments suggests that we need > quite > more points than the declared minimum to get good result. > > For a degree 2, the minimum is 6 points. It seems to me that 10 points should > be > enough, but it may be worth to try more. > > >> Anyways, I appreciate the help. Should I be using a different value for >> the degrees? Could that really flip the result upside down? >> > > I would suggest to try a degree 1 first (which is basically an affine > transform) > with the 10 points. Then increment the degree progressively, but I would not > suggest to go higher than 4 degrees (2 is probably enough). > > However the image should not be upside down. Or maybe this effect appears > because pixel coordinates are increasing down while geographic coordinates are > incresing up. An easy fix would be to replace y values by (height - y). > > Could you post your source and target coordinates please? > > Martin > -- Graham Davis Refractions Research Inc. gda...@refractions.net ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel