I have external WMS server, which have a layer pusblished in Mercator projection (EPSG:3395). I have this layer set up in Geoserver (2.8.1, GeoTools 14.1).
I need to expose this layer via WMTS in EPSG:4326.
The problem occurs when I try to query it using EPSG:4326 projection.
Basically, whatever I try I run into the following error:
Caused by: org.geotools.referencing.operation.projection.ProjectionException: Latitude 90°00.0'S is too close to a pole.
with varying value depending on the bbox I use.
So far, I've tried the following:
- changing layer's Native Bounding Box from [-20037508.3428, -15496570.7397, 20037508.3428, 18764656.2314] to [-20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428] back and forth;
- setting layer's Lat/Lon Bounding Box to [-180, -80, 180, 84], [-180, -85, 180, 85] and [-180, -90, 180, 90];
- trying to create custom grid for GWC layer based on EPSG:4326 with bounds of [-180, -80, 180, 84]
It works perfectly well when I query it with EPSG:900913 projection, with blank zones on the top and the bottom of the map. It also works well when I query it via OpenLayers in EPSG:4326, if I don't get past the 90° latitude. Is there something I'm missing?