Closed radi2015 closed 1 year ago
WKTReader wktReader=new WKTReader(); Geometry point = wktReader.read("POINT (0 1)"); Geometry line = wktReader.read("LINESTRING (0 0, 0 2)"); System.out.println(line.difference(point)); LINESTRING (0 0, 0 2)
why line.difference(point) is LINESTRING (0 0, 0 2) not MULTILINESTRING((0 0,0 1),(0 1,0 2)) is there something wrong with this?
Well, topologically speaking the two answers are the same. And that's the model that the overlay implementation is based on.
It would be nice if JTS had a Split function that would do this kind of thing.
Split
why line.difference(point) is LINESTRING (0 0, 0 2) not MULTILINESTRING((0 0,0 1),(0 1,0 2)) is there something wrong with this?