GeneralEnvelope.setRange(int, double, double) currently contains this code:
This approach has two problems:
- It is a cause of bug that may be long to identify, since the coordinates are silently modified. An exception, or at the very least a warning could save developper time.
- WCS authorizes (with special treatment) cases where maximum < minimum at least in the longitude case. They are envelope crossing the antimeridian.
We should accept maximum < minimum only for axis declared with RangeMeaning.WRAPAROUND. For other axis, we need to decide if we should throws an exception, reorder the minimum and maximum or just log a warning.
Every GeneralEnvelope methods like contains will need to be updated for taking the antimeridian crossing case in account.