Details
Description
Situation:
- coverage whose envelope spans the whole globe (exactly, -180/180, -90/90)
- coverage is in 4326
- reprojection is requested to 900913
The result is the following exception:
20 mar 16:21:01 WARN [geotools.rendering] - Latitude 90°00.0'S is too close to a pole. org.geotools.referencing.operation.projection.ProjectionException: Latitude 90°00.0'S is too close to a pole. at org.geotools.referencing.operation.projection.Mercator$Spherical.transformNormalized(Mercator.java:212) at org.geotools.referencing.operation.projection.MapProjection.transform(MapProjection.java:784) at org.geotools.referencing.operation.projection.MapProjection.transform(MapProjection.java:825) at org.geotools.referencing.operation.transform.AbstractMathTransform.transform(AbstractMathTransform.java:217) at org.geotools.referencing.CRS.transform(CRS.java:983) at org.geotools.referencing.CRS.transform(CRS.java:929) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.paint(GridCoverageRenderer.java:354) at org.geotools.renderer.lite.StreamingRenderer.renderRaster(StreamingRenderer.java:1850) at org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1709) ...
The issue is that the code is trying to reproject the whole native envelope to 900913, but rendering over
google maps does not require that (the map is actually cut at 85° or something like that).