Details
Description
In the class org.geotools.coverage.grid.GriCoverage2D there is a wrong cicle in the constructor when checking for AxisDirections in respect to Image axis orientation.
The line "cs.getAxis(1).getDirection()" sould be "cs.getAxis
.getDirection()" and the line "inverse[i] = toInverse.equals(...)" should be "inverse[dim - i - 1] = toInverse.equals(...)" where dim is the number of coverage dimensions (2 for a 2D coverage).
Issue Links
- relates to
-
GEOT-701
GridGeometry improvements
-
However, the "inverse[dim - i - 1]" is less obvious to me. For a 2D grid coverage, this mean "if axis 0 is oriented toward West instead of East, actually invert axis 1 (usually the y axis). If axis 1 is oriented toward South instead of North, actually invert axis 0 (usually the x axis)". Maybe this situation is wanted when the coordinate reference system uses a (latitude,longitude) order? (I would need to check what the actual behavior is in such case). So my question regarding the [dim - i - 1] proposal is: which CRS is in use when such case is wanted?