public class GeoAreaSet extends Object
| Constructor and Description |
|---|
GeoAreaSet()
Creates a new instance of GeoAreaSet
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArea(GeoArea newArea)
Adds a new area to the area set
|
AreaIncursion |
firstIncursion(Route route)
Returns an AreaIncursion for the first point at which a route
enters an area of the area set
|
void |
getAllTangents(double[] start,
List<double[]> result)
Determines the points on the area's edge that are
tangentially reachable from a specified point
|
GeoArea |
getArea(int index)
Returns a reference to the area specified by an index
|
List<AreaIncursion> |
getIncursions(Route route) |
protected Iterator<GeoArea> |
getIterator()
Returns an iterator for the waypoint list
|
boolean |
isClearPath(double x1,
double y1,
double x2,
double y2)
Utility function that determines whether a straight path (i.e., a line
segment) encroaches into any of the contained GeoAreas
|
boolean |
isContainedInArea(double x,
double y)
Utility function that determines whether a point is contained in any of the contained GeoAreas
|
int |
numAreas()
Returns the number of areas in the set
|
String |
toMATLABString(String colorCode)
Generates a string representation of the Path object that can be used to plot the path in MATLAB
|
String |
toString()
Utility function for printing all items in a GeoAreaSet
|
public void addArea(GeoArea newArea)
newArea - public GeoArea getArea(int index)
index - protected Iterator<GeoArea> getIterator()
public int numAreas()
public AreaIncursion firstIncursion(Route route)
route - public List<AreaIncursion> getIncursions(Route route)
route - public boolean isContainedInArea(double x,
double y)
x - north/south coordinate of the point being testedy - east/west coordinate of the point being testedpublic boolean isClearPath(double x1,
double y1,
double x2,
double y2)
x1 - north/south coordinate of the first end point of the line segment being testedy1 - east/west coordinate of the first end point of the line segment being testedx2 - north/south coordinate of the second end point of the line segment being testedy2 - east/west coordinate of the second end point of the line segment being testedpublic void getAllTangents(double[] start,
List<double[]> result)
start - the point from which tangents are to be determined start[0] = x, start[1] = yresult - an ArrayList with double[2] objects representing the tangent points to all of the contained areaspublic String toString()
public String toMATLABString(String colorCode)
colorCode - MATLAB code for the color that is to be used in plotting the areas