Thanks for all the help with the zonal statistics, I was amazed to wake up this
morning with 5 replies! I'll have a look at the jai tools that Michael and
Simone have recommended this afternoon, but in the meantime I'd just like to
ask about the behaviour of the GridFormatFinder (the behaviour on my machine is
different to that which Jody talked about).
On 10 May 2011, at 01:34, Jody Garnett wrote:
I did a quick test with the normal GridFormatFinder and it works to read
ArcGrid ASCII:
final File f = TestData.file(this, "ArcGrid.asc");
// Reading the coverage through a file
AbstractGridFormat format = GridFormatFinder.findFormat( f );
AbstractGridCoverage2DReader reader = format.getReader(f);
GridCoverage2D gc = reader.read(null);
I have tried something similar but it doesn't work for me:
File ascFile = new File("data/leeds_dtm/raster.asc.gz");
AbstractGridFormat format = GridFormatFinder.findFormat(ascFile);
System.out.println(format.getName()); // 'Unkown Format'
AbstractGridCoverage2DReader reader = format.getReader(rasterFile); // Throws
"UnsupportedOperationException: Trying to get a reader from an unknown format."
Interestingly, this command: "GridFormatFinder.getAvailableFormats()" returns
an empty array whereas yesterday I'm sure the array had two GeoTiff-like
objects in it (can't remember exactly what they were).
Think this could be a problem with my configuration? I followed the Netbeans
quickstart tutorial to set up geotools (great tutorial by the way) and the demo
code (e.g. ImageLab) work fine. I'm using version "8.0-M0".
Thanks again for the help,
Nick
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users