Open jodygarnett opened 5 years ago
There is probably no test case currently which creates this combination of coordinate arrays. One should be added, at least to test intersection
.
There may well be other places where JTS is creating Coordinates directly - these should be tracked down as well.
See also this comment: https://github.com/locationtech/jts/issues/370#issuecomment-468926825
Follow on to #374 we have found GeoTools test cases producing inconsistent coordinate sequence through a sequence of JTS calls ending in an
intersection
call.This is an interesting case using
intersection()
between mixed dimensions:CoordinateXY
(footprint polygon from WKB)Coordinate
(taken from mosaic bounds).We suspect one of the internal JTS methods in the overlay process path is calling
new Coordinate()
rather than relying onCoordinateSequence.createCoordinate()
.The net effect is closing a LinearRing with a Coordinate when all the other coordinates are CoordinateXY. This produces a CoordinateArraySequence with inconsistent Coordinates, which will start failing when the CoordinateArraySequence constructor is tightened up to check this as in #374.