Package mil.nga.sf.util.sweep
Class SweepLine
- java.lang.Object
-
- mil.nga.sf.util.sweep.SweepLine
-
public class SweepLine extends Object
Sweep Line algorithm- Since:
- 1.0.5
- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description SweepLine(List<LineString> rings)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Segment
add(Event event)
Add the event to the sweep lineSegment
find(Event event)
Find the existing event segmentboolean
intersect(Segment segment1, Segment segment2)
Determine if the two segments intersectvoid
remove(Segment segment)
Remove the segment from the sweep linestatic int
xyOrder(Point point1, Point point2)
XY order of two points
-
-
-
Constructor Detail
-
SweepLine
public SweepLine(List<LineString> rings)
Constructor- Parameters:
rings
- polygon rings
-
-
Method Detail
-
add
public Segment add(Event event)
Add the event to the sweep line- Parameters:
event
- event- Returns:
- added segment
-
find
public Segment find(Event event)
Find the existing event segment- Parameters:
event
- event- Returns:
- segment
-
intersect
public boolean intersect(Segment segment1, Segment segment2)
Determine if the two segments intersect- Parameters:
segment1
- segment 1segment2
- segment 2- Returns:
- true if intersection, false if not
-
remove
public void remove(Segment segment)
Remove the segment from the sweep line- Parameters:
segment
- segment
-
-