[EMAIL PROTECTED] a écrit :
> I printed the bounding box and the gridToCRS. There is a difference
> about a half of a original pixels width/height. That's because the
> gridToCRS takes the pixel center, isn't it? Or this the problem?
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