Sorry about that incomplete first message -- GMail freaked out on me...
Hi,
I am doing some work reading coordinates from geotiffs. I want to
determine the bounding box of the entire image so I thought I would
use getOriginalEnvelope() (returns a GeneralEnvelope) but when I did
that I came up with different corners than I expected.
My question is: Is the GeneralEnvelope being returned truly the same
as a bounding box for the image?
This is the code I used to dump some of the coordinates:
final GeoTiffReader reader = new GeoTiffReader(new File(geotiff));
System.out.println(reader.getOriginalEnvelope().getUpperCorner());
System.out.println(reader.getOriginalEnvelope().getLowerCorner());
for (TiePoint pt : reader.getMetadata().getModelTiePoints()) {
for (double val : pt.getData()) {
System.out.print(val+" ");
}
}
and this gave me (this is from a UTM geotiff):
541,400.25 m 4,260,992.25 m
287,550.75 m 4,033,134.75 m
0.0 0.0 0.0 287565.0 4260978.0 0.0
I expected the GeneralEnvelope coordinates to match with the related
TiePoint (3rd line) but they did not. Am I not comparing apples to
apples in this example?
Thanks,
Kevin
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users