From: Gabriella T. <Gab...@ni...> - 2014-07-21 22:13:53
|
My code: @Test public void testReadASCIIGridFile() throws IllegalArgumentException, IOException { File input = new File("/Users/turekg/Desktop/AvonFloodData/avon_d12_100yr_0mslr_postdec_sb11pt2_max_d.asc"); /* AbstractGridFormat gridFormat = GridFormatFinder.findFormat(input); GridCoverage2DReader reader = gridFormat.getReader(input); */ ArcGridReader dsDem = new ArcGridReader(input); GridCoverage2D gc = (GridCoverage2D) dsDem.read(null); GridSampleDimension[] gsd = gc.getSampleDimensions(); int dim = gsd.length; System.out.println("dim = " + dim); } The error is: Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/geotools/imageio/unidata/UnidataImageReaderSpi at java.lang.ClassLoader.defineClass1(Native Method) I am using geotools 11.2, on Mac OS X 1.9 and java 1.7_65 This code has worked for me in the past. I've looked for the missing class in the binary distro jar files, but can't find it . Thanx Gaby |