[Jts-topo-suite-user] LineStringSnapper.snapSegments bugs ?
Brought to you by:
dr_jts
From: strk <st...@ke...> - 2010-12-03 17:33:49
|
I'm reviewing LineStringSnapper to make sure GEOS port is correct and found something that sound like an useless check. In snapSegments, when a snap point is found, we add that to the source CoordinateList asking to check for duplicates. But the snap point is found using findSegmentIndexToSnap which refuses to consider a segment snapping on an endpoint as a valid match (returns -1 in that case). So, how is it possible for a snap point to be equal to previous ? int index = findSegmentIndexToSnap(snapPt, srcCoords); if (index >= 0) { srcCoords.add(index + 1, new Coordinate(snapPt), false); } Am I missing something or the srcCoords.add() call might be performed w/out the final argument (avoid checking for duplicates) ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html |