From: Jody G. <jga...@re...> - 2007-09-23 08:49:58
|
Well I asked for an example of how to read a world + image file last month - so this month I am trying to write it myself. > File file = getImageFile( args ); > WorldImageReader reader = new WorldImageReader( file ); > final GridCoverage2D coverage = (GridCoverage2D) > reader.read(null); > > System.out.println( coverage.getEnvelope() ); > System.out.println( coverage.getRenderedImage() ); > System.out.println( coverage.getRenderedImage().getData() ); > coverage.show(); Problem is the code hangs (at least when using the earthlights.jpg and clouds.jpg available in the uDig sample dataset). Stepping through the code with a debugger shows the point of no return being ... line number 2. new WorldImageRedaer( file ). Navigating into the constructor shows the getHRInfo() method being fatal; it passes over control to IIORegistry... A call called TextReader; used by TextMatrixImageReader is stuck in an endless loop. The environment I am running is is 2.4-RC0; the setup was to dump everything into an eclipse project as per my recent wiki page. Help? Jody |