Fixed, needed quite a few additional jar files in my path.

From: Gabriella Turek 
<gabriella.tu...@niwa.co.nz<mailto:gabriella.tu...@niwa.co.nz>>
Date: Tuesday, 22 July 2014 10:13 am
To: 
"geotools-gt2-users@lists.sourceforge.net<mailto:geotools-gt2-users@lists.sourceforge.net>"
 
<geotools-gt2-users@lists.sourceforge.net<mailto:geotools-gt2-users@lists.sourceforge.net>>
Subject: [Geotools-gt2-users] Problems reading ASCII grid files

My code:


@Test

publicvoid 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


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to