|
From: Jesse S. <jes...@gm...> - 2007-07-10 03:23:07
|
Hi All,
I am completely new to GIS and geotools, so please forgive me if what I am
asking is completely stupid. :)
Basically, I am trying to programatically determine the geographical
coordinates at various points inside of a GEOTiff file. The tiff file also
has a coordinates file attached that is the following:
63.930295999999991
0.0
0.0
-63.930295999999991
-411206.90390770847
18884.472706639983
I've played with code such as the following, but I am really at a loss as to
whether I am even in the right direction or not.
File testFile = new
File("/home/jsight/projects/personal/java/AviationMapViewer/sampledata/Atlanta_20070315/Atlanta
78 South.tif");
//FileImageInputStream f = new FileImageInputStream (new
RandomAccessFile (testFile, "r"));
try {
WorldImageFormat wif = new WorldImageFormat();
WorldImageReader wir =
(WorldImageReader)wif.getReader(testFile);
System.err.println("Format: " + wir.getFormat().getName());
GridCoverage gc = wir.read(new GeneralParameterValue[0]);
int [] upperCoord = wir.getOriginalGridRange
().getUpper().getCoordinateValues();
for (int i = 0; i < upperCoord.length; i++) {
System.err.println("Upper[" + i + "]: " + upperCoord[i]);
}
} finally {
//f.close();
}
Is there any documentation that really describes what the various coordinate
systems represent and how they can be used? I've read some of the docs on
the website, but it's pretty confusing for someone completely new to this
whole world.
Thank you!
Jess
|