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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(double x, double y) Determine whether a point (given as a lat and a lon is inside the BasePolygon.booleanDetermine whether a point (given as a Vertex object) is inside the BasePolygon.doubleGets the latitude of the most Northerly Vertex in the BasePolygon.doubleGets the latitude of the most Easterly Vertex in the BasePolygon.doubleGets the latitude of the most Southerly Vertex in the BasePolygon.doubleGets the latitude of the most Westerly Vertex in the BasePolygon.getName()intvoidsetPolyid(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:BasePolygonGets 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:
getMinLatin classBasePolygon- Returns:
- The minLat value
-
getMaxLat
public double getMaxLat()Description copied from class:BasePolygonGets 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:
getMaxLatin classBasePolygon- Returns:
- The maxLat value
-
getMinLon
public double getMinLon()Description copied from class:BasePolygonGets 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:
getMinLonin classBasePolygon- Returns:
- The minLon value
-
getMaxLon
public double getMaxLon()Description copied from class:BasePolygonGets 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:
getMaxLonin classBasePolygon- Returns:
- The maxLon value
-
contains
public boolean contains(double x, double y) Description copied from class:BasePolygonDetermine whether a point (given as a lat and a lon is inside the BasePolygon. Uses a method by Sedgewick, "Algorithms in C"- Overrides:
containsin 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:BasePolygonDetermine whether a point (given as a Vertex object) is inside the BasePolygon. Uses a method by Sedgewick, "Algorithms in C"- Overrides:
containsin 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
-