| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
package org.locationtech.jts.index.chain; |
| 15 |
|
| 16 |
import org.locationtech.jts.geom.LineSegment; |
| 17 |
|
| 18 |
/** |
| 19 |
* The action for the internal iterator for performing |
| 20 |
* overlap queries on a MonotoneChain |
| 21 |
* |
| 22 |
* @version 1.7 |
| 23 |
*/ |
| 24 |
public class MonotoneChainOverlapAction |
| 25 |
{ |
| 26 |
protected LineSegment overlapSeg1 = new LineSegment(); |
| 27 |
protected LineSegment overlapSeg2 = new LineSegment(); |
| 28 |
|
| 29 |
/** |
| 30 |
* This function can be overridden if the original chains are needed |
| 31 |
* |
| 32 |
* @param start1 the index of the start of the overlapping segment from mc1 |
| 33 |
* @param start2 the index of the start of the overlapping segment from mc2 |
| 34 |
*/ |
| 35 |
public void overlap(MonotoneChain mc1, int start1, MonotoneChain mc2, int start2) |
| 36 |
{ |
| 37 |
mc1.getLineSegment(start1, overlapSeg1); |
| 38 |
mc2.getLineSegment(start2, overlapSeg2); |
| 39 |
overlap(overlapSeg1, overlapSeg2); |
| 40 |
} |
| 41 |
|
| 42 |
/** |
| 43 |
* This is a convenience function which can be overridden to obtain the actual |
| 44 |
* line segments which overlap |
| 45 |
* @param seg1 |
| 46 |
* @param seg2 |
| 47 |
*/ |
| 48 |
public void overlap(LineSegment seg1, LineSegment seg2) |
| 49 |
{ |
| 50 |
} |
| 51 |
} |
| 52 |
|