Class Region

java.lang.Object
gov.usgs.earthquake.qdm.Region

public class Region extends 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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    String for net id
    Arraylist of points
    String for region id
  • Constructor Summary

    Constructors
    Constructor
    Description
    Region(String netid, String regionid)
    Region constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • netid

      public String netid
      String for net id
    • regionid

      public String regionid
      String for region id
    • points

      public ArrayList<Point> points
      Arraylist of points
  • Constructor Details

    • Region

      public Region(String netid, String regionid)
      Region constructor
      Parameters:
      netid - string
      regionid - string
  • Method Details

    • 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