Hi all,
I’m running into some issues with longitude subsetting in WCS2.0 with coverages referenced from 0-360 (GRIB in particular). This can be seen in this ticket.
https://osgeo-org.atlassian.net/browse/GEOT-5372
For starters, there are some small bugs in the WCSEnvelope class, in particular the intersects method. See here:
There are a couple issues here:
-
This code assumes that the normalized envelopes are returned in “left-to-right” order, but they are not. eg. 0-360 normalizes to two envelopes, (0,180), (-180,0). Not a big deal, an easy fix.
-
It is not checking the “other” envelope to see if it crosses the date line. So if the other is (0,360), the intersection becomes simply (0,180). Again, not a big issue.
The bigger issue, as far as I can tell, is normalizing the request bounds in the first place. Is this necessary? WCS2.0 seems to be the only code-path where this is the case. WMS, WCS1.x, etc., none of these seem to normalize the request. So if you request (0,360) the coverage store read ends up for (0,360) at least. This seems correct to me, and it seems to be what the coverage stores support (or at least NetCDF and ImageMosaic).
So what is the correct thing to do here? Should the request bounds be normalized, or should the readers be updated to support the normalized bounds? Or am I missing something else?
Thanks,
Devon