Discussion:
[Jts-topo-suite-user] Change in LineString.normalize()
Michaël Michaud
2016-02-16 07:13:39 UTC
Permalink
Hi Martin,

Just wonder if you were aware that r1013 change on
LineString.normalize() can
corrupt data.
Maybe due to a misuse of the API. Judge by yourself. Here is how we get
a full
dataset corrupted after switching to JTS 1.14 :

- create LineStrings from each pair of consecutive coordinates of a geometry
- normalize these new LineStrings
==> original geometries are corrupted because ordinates of some coordinates
have changed !

Maybe the normalize method should follow the general contract of Geometry
about immutablity and work on a copy of CoordinateSequence.
What do you think ?

Michaël

Loading...