Martin,

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?

I tried to divide the pixels into 16 pieces and I get the following:

1 2 3
4 5 6
7 8 9

0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 1 2 2 2 2 3 3 3
0 0 1 1 1 2 2 2 2 3 3 3
0 0 1 1 1 2 2 2 2 3 3 3
0 0 4 4 4 5 5 5 5 6 6 6
0 0 4 4 4 5 5 5 5 6 6 6
0 0 4 4 4 5 5 5 5 6 6 6
0 0 4 4 4 5 5 5 5 6 6 6
0 0 7 7 7 8 8 8 8 9 9 9
0 0 7 7 7 8 8 8 8 9 9 9
0 0 7 7 7 8 8 8 8 9 9 9

The grid is shifted about one pixel down, and to the right as well  
(quarter of an original pixel). Furthermore the same "range" (half of  
the original pixel width/height) becomes 0, as in the first  
resampling test.

When I divide the pixels into nine pieces, the grid is shiftet about  
one pixel (third of an original pixel).

0 0 0 0 0 0 0 0 0
0 1 1 1 2 2 2 3 3
0 1 1 1 2 2 2 3 3
0 1 1 1 2 2 2 3 3
0 4 4 4 5 5 5 6 6
0 4 4 4 5 5 5 6 6
0 4 4 4 5 5 5 6 6
0 7 7 7 8 8 8 9 9
0 7 7 7 8 8 8 9 9

Strange behaviour...

Christian


Am 14.08.2008 um 11:39 schrieb Martin Desruisseaux:

> 0 is probably taken as "no data value". The "real world"  
> coordinates of the first row and first column are probably slightly  
> outside the "real world" bounding box of the original raster (you  
> may prints their bounding box for testing this hypothesis, as well  
> as the "gridToCRS" transform). If this is the case, I don't know  
> why the Resample operation computed a bounding box slightly outside  
> the original bounding box. We would need to open a JIRA task with a  
> test case to track this issue.
>
>       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

Reply via email to