Closed jodygarnett closed 2 months ago
This is minimal change to avoid exception.
I looked at "casting" coordinates to solve https://github.com/locationtech/jts/issues/375 but am uncomfortable doing so in performance sensitive code.
Looks good to me.
Defensive check prevents copyWithZ, copyWithZInterpolate methods from throwing an exception when the target coordinate is CoordinateXY or CoordinateXYM.
This is in addition to the existing defensive check to avoid doing anything if the z vale was Double.NaN.
This mitigates but does not solve https://github.com/locationtech/jts/issues/375 which is due to the intermixing of Coordinate and CoordinateXY values in GeoTools clipping code.