[geotk] NetCDF Coverage Resampling Issue
Aaron Braeckel
braeckel at ucar.edu
Thu Feb 17 23:08:59 EST 2011
Hello,
I am currently doing the following (with SNAPSHOT):
ImageCoverageReader reader = new ImageCoverageReader();
reader.setInput( TestUtil.readFile(
"data/GTG_20090721_v_220000_l_0003600.grb" ) );
CoordinateReferenceSystem targetCRS = CRS.decode( "EPSG:4326" );
GridCoverage cvg = reader.read( 0, null );
Coverage resultCvg = Operations.DEFAULT.resample( cvg, targetCRS,
cvg.getGridGeometry(), Interpolation.getInstance(
Interpolation.INTERP_NEAREST ) );
System.out.println( "Resampled to "+resultCvg);
reader.dispose();
The call to read() is successful, but when I call resample() I get the
following Exception:
java.lang.UnsupportedOperationException: Not supported yet.
at
org.geotoolkit.referencing.adapters.NetcdfCRS$Projected.getConversionFromBase(NetcdfCRS.java:894)
at
org.geotoolkit.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:961)
at
org.geotoolkit.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:248)
at
org.geotoolkit.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1306)
at
org.geotoolkit.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1181)
at
org.geotoolkit.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:208)
at
org.geotoolkit.referencing.operation.CachingCoordinateOperationFactory.createOperation(CachingCoordinateOperationFactory.java:222)
at
org.geotoolkit.referencing.operation.CachingCoordinateOperationFactory.createOperation(CachingCoordinateOperationFactory.java:251)
at
org.geotoolkit.coverage.processing.operation.Resampler2D.reproject(Resampler2D.java:361)
at
org.geotoolkit.coverage.processing.operation.Resample.doOperation(Resample.java:249)
at
org.geotoolkit.coverage.processing.DefaultCoverageProcessor.doOperation(DefaultCoverageProcessor.java:321)
at
org.geotoolkit.coverage.processing.CachingCoverageProcessor.doOperation(CachingCoverageProcessor.java:167)
at
org.geotoolkit.coverage.processing.Operations.doOperation(Operations.java:788)
at
org.geotoolkit.coverage.processing.Operations.resample(Operations.java:458)
Is there another method for resampling that I should be using, or
perhaps is there a component of the NetCDF coverage logic that is not
yet implemented?
Thanks,
Aaron
More information about the Geotoolkit
mailing list