Package gov.usgs.earthquake.qdm
Class Region
- java.lang.Object
-
- gov.usgs.earthquake.qdm.Region
-
public class Region extends java.lang.Object
A polygon without holes. Points are assumed to use x=longitude, y=latitude. A "default" region has no boundary points, and contains all points.
-
-
Constructor Summary
Constructors Constructor Description Region(java.lang.String netid, java.lang.String regionid)
Region constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
inpoly(Point xy)
Method to determine if this lat-lon in this region? In or out algorithm taken from an algorithm by Edwards and Coleman of Oak Ridge Lab, version for BNL by Benkovitz translated to C by Andy Michael and into Java by Alan Jones.
-
-
-
Field Detail
-
netid
public java.lang.String netid
String for net id
-
regionid
public java.lang.String regionid
String for region id
-
points
public java.util.ArrayList<Point> points
Arraylist of points
-
-
Method Detail
-
inpoly
public boolean inpoly(Point xy)
Method to determine if this lat-lon in this region? In or out algorithm taken from an algorithm by Edwards and Coleman of Oak Ridge Lab, version for BNL by Benkovitz translated to C by Andy Michael and into Java by Alan Jones.- Parameters:
xy
- point- Returns:
- bool if point is in region
-
-