Hi everyone, Is there a way of having StreamingRenderer.paint(...) handle the ProjectionException that is thrown by Resample.doOperation() when you request an envelope that extends outside the valid domain of the projection of the source coverage? Sample stack trace below.
I'm working with imagery from geostationary satellites and the projection is handled by https://github.com/geotools/geotools/blob/master/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/GeostationarySatellite.java . The aim is to be able to extract sub-images in, say, WGS84 from a (cloud optimised) GeoTIFF. When the requested envelope is in the middle of the source image it all works seamlessly but I can't request an image from the edge of the satellite's field of view. A successful request would, of course, have empty pixels through the part of the destination image that was outside of the source projection's valid domain. Thanks in advance for any help. Andrew org.geotools.renderer.lite.StreamingRenderer$RenderCoverageReaderRequest execute WARNING: Can't reproject grid coverage .... org.geotools.coverage.processing.CannotReprojectException: Can't reproject grid coverage .... at org.geotools.coverage.processing.operation.Resample.doOperation(Resample.java:260) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRendererUtilities.resample(GridCoverageRendererUtilities.java:129) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRendererUtilities.reproject(GridCoverageRendererUtilities.java:182) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRendererUtilities.reproject(GridCoverageRendererUtilities.java:150) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:733) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.paint(GridCoverageRenderer.java:897) at org.geotools.renderer.lite.StreamingRenderer$RenderCoverageReaderRequest.execute(StreamingRenderer.java:3880) at org.geotools.renderer.lite.StreamingRenderer$PainterThread.run(StreamingRenderer.java:3991) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:830) Caused by: org.geotools.referencing.operation.projection.ProjectionException at org.geotools.referencing.operation.projection.GeostationarySatellite$Ellipsoidal.inverseTransformNormalized(GeostationarySatellite.java:230) at org.geotools.referencing.operation.projection.MapProjection$Inverse.transform(MapProjection.java:1047) at org.geotools.referencing.operation.projection.MapProjection$Inverse.transform(MapProjection.java:1106) at org.geotools.referencing.operation.transform.AbstractMathTransform.transform(AbstractMathTransform.java:215) at org.geotools.referencing.operation.transform.ConcatenatedTransformDirect.transform(ConcatenatedTransformDirect.java:55) at org.geotools.referencing.CRS.transform(CRS.java:1397) at org.geotools.referencing.CRS.transform(CRS.java:1477) at org.geotools.coverage.processing.operation.Resampler2D.reproject(Resampler2D.java:478) at org.geotools.coverage.processing.operation.Resample.doOperation(Resample.java:248) ... 12 more
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users