Package llnl.gnem.core.polygon
Class Polygon
java.lang.Object
llnl.gnem.core.polygon.BasePolygon
llnl.gnem.core.polygon.Polygon
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(double x, double y) Determine whether a point (given as a lat and a lon is inside the BasePolygon.boolean
Determine whether a point (given as a Vertex object) is inside the BasePolygon.double
Gets the latitude of the most Northerly Vertex in the BasePolygon.double
Gets the latitude of the most Easterly Vertex in the BasePolygon.double
Gets the latitude of the most Southerly Vertex in the BasePolygon.double
Gets the latitude of the most Westerly Vertex in the BasePolygon.getName()
int
void
setPolyid
(int polyid) Methods inherited from class llnl.gnem.core.polygon.BasePolygon
getVertices, makeCirclePolygon, makeCirclePolygon_Deg, scale
-
Constructor Details
-
Polygon
-
Polygon
-
-
Method Details
-
getPolyId
public int getPolyId() -
getName
-
getMinLat
public double getMinLat()Description copied from class:BasePolygon
Gets the latitude of the most Southerly Vertex in the BasePolygon. For rapid selection of candidate points from the database, it is convenient to get the lat and lon extrema of the BasePolygon to form a query that returns all the points within the smallest box that encloses the BasePolygon.- Overrides:
getMinLat
in classBasePolygon
- Returns:
- The minLat value
-
getMaxLat
public double getMaxLat()Description copied from class:BasePolygon
Gets the latitude of the most Northerly Vertex in the BasePolygon. For rapid selection of candidate points from the database, it is convenient to get the lat and lon extrema of the BasePolygon to form a query that returns all the points within the smallest box that encloses the BasePolygon.- Overrides:
getMaxLat
in classBasePolygon
- Returns:
- The maxLat value
-
getMinLon
public double getMinLon()Description copied from class:BasePolygon
Gets the latitude of the most Westerly Vertex in the BasePolygon. For rapid selection of candidate points from the database, it is convenient to get the lat and lon extrema of the BasePolygon to form a query that returns all the points within the smallest box that encloses the BasePolygon.- Overrides:
getMinLon
in classBasePolygon
- Returns:
- The minLon value
-
getMaxLon
public double getMaxLon()Description copied from class:BasePolygon
Gets the latitude of the most Easterly Vertex in the BasePolygon. For rapid selection of candidate points from the database, it is convenient to get the lat and lon extrema of the BasePolygon to form a query that returns all the points within the smallest box that encloses the BasePolygon.- Overrides:
getMaxLon
in classBasePolygon
- Returns:
- The maxLon value
-
contains
public boolean contains(double x, double y) Description copied from class:BasePolygon
Determine whether a point (given as a lat and a lon is inside the BasePolygon. Uses a method by Sedgewick, "Algorithms in C"- Overrides:
contains
in classBasePolygon
- Parameters:
x
- The latitude of the point to be testedy
- The longitude of the point to be tested- Returns:
- true if the point is inside the BasePolygon
-
contains
Description copied from class:BasePolygon
Determine whether a point (given as a Vertex object) is inside the BasePolygon. Uses a method by Sedgewick, "Algorithms in C"- Overrides:
contains
in classBasePolygon
- Parameters:
v
- The point to be tested- Returns:
- true if the point is inside the BasePolygon
-
setPolyid
public void setPolyid(int polyid) - Parameters:
polyid
- the polyid to set
-