It seems that the rounding in GeneralGridRange(Envelope) is not the problem here.
I changed the constructor as you suggested, but the shifting remains. Then I realized that this constructor is never invoked. GeneralGridRange(lower, upper) (the second) is invoked by my code instead. The printed upper and lower values from inside the constructor are correct, thus the problem seems to occure later. Any idea on this? Christian Am 14.08.2008 um 15:30 schrieb Martin Desruisseaux: > It is very likely to be related to the way envelope are rounded. > > Current GeoTools rounding mode is "nearest integer" (Math.round). > They were recent discussion about changing the rounding mode to > "lower integer" (Math.floor) for the first row/column, but it would > probably have accentuated the behavior you are observing. > > A possible experiment may be to change the rounding mode in > GeneralGridRange(Envelope) constructor - this constructor already > has a quite large discussion about rounding more in the javadoc. It > could be interresting to check if "higher integer" (Math.ceil) for > the first row/column help. > > Martin ------------------------------------------------------------------------- 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
