for( int i = 0; i < intersection.getNumGeometries(); i++ ) {
Point vertex = (Point) intersection.getGeometryN(i);
adaptedSegment = SplitUtil.insertVertexInLine(adaptedSegment, vertex.getCoordinate());
}
}
segmentMap.put(adaptedSegment.toText(), adaptedSegment );
} else { // add the original segment
segmentMap.put(segment.toText(), segment );
}
}
return segmentMap;