public class Region_Of_Interest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
Constructor and Description |
---|
Region_Of_Interest(java.lang.String planetocentric_roi)
Construct a new region of interest object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
cipp_vertices()
Get the region of interest formatted as expected for CIPP output, longitude
first, latitude second in planetographic coordinates.
|
boolean |
Contains(double longitude,
double latitude,
boolean shift_longitude_domain)
A containment test, to see if a given point lies within the region of
interest.
|
java.awt.geom.Point2D |
getCenter()
Get the center coordinates of the ROI.
|
java.lang.String |
getWKT180180CenterPoint() |
static void |
main(java.lang.String[] args)
A very simple main method for testing the class functionality.
|
double |
Maximum_Longitude(boolean shift_longitude_domain)
Get the maximum longitude of the Region of Interest
|
double |
Maximum_Planetocentic_Latitude()
Get the maximum planetocentric latitude of the Region of Interest
|
double |
Minimum_Longitude(boolean shift_longitude_domain)
Get the minimum longitude of the Region of Interest
|
double |
Minimum_Planetocentric_Latitude()
Get the minimum planetocentric latitude of the Region of Interest
|
java.lang.String |
Planetocentric_ROI_String()
Return the region of interest vertexes in planetocentric coordinates as a
comma separated string of coordinates.
|
java.util.Vector<java.util.Vector<java.lang.Double>> |
planetocentricROIVector()
Return the ROI as a vector of vectors in planetocentric coordinates.
|
java.lang.String |
Planetographic_ROI_String()
Return the region of interest vertexes in planetographic coordinates as a
comma separated string of coordinates.
|
java.util.Vector<java.util.Vector<java.lang.Double>> |
planetographicROIVector()
Return the ROI as vector of vectors in planetographic coordinates.
|
boolean |
redundantPointsRemoved()
Indicates if any points were removed from the getCenter() calculation
due to being below the
separationThreshold |
double |
ROI_Area()
Get the area of the ROI, unsigned.
|
java.util.Vector<java.lang.Double> |
ROI_Centroid()
Get the centroid coordinates of the Region Of Interest.
|
boolean |
ROI_Crosses_0_Longitude()
A test to determine if an ROI crosses 0 degrees longitude.
|
static java.lang.String |
roi_string(java.util.Vector<java.util.Vector<java.lang.Double>> vertices)
Convert the given vector into an ROI string suitable for input into the
ROI_VERTICES field in Suggested_Observations.
|
java.lang.String |
roif_polygon()
Get the region of interest vertexes formatted for a region of interest
file (roif)
|
java.util.Vector<java.util.Vector<java.lang.Double>> |
shift_longitude_domain(java.util.Vector<java.util.Vector<java.lang.Double>> roi)
This method will shift an roi from the 0,360 longitude domain to the
-180,180 longitude domain.
|
Region_Of_Interest |
shift(double longitude_shift,
double latitude_shift)
Shift the region of interest by the amount specified by the method arguments,
and return a shifted Region_Of_Interest.
|
double |
Signed_ROI_Area()
Get the signed area of the ROI.
|
java.lang.String |
toString() |
java.lang.String |
WKT_180180_Centroid_Point()
Get the "Well Known Text" (WKT) representation of the centroid converted to
180,-180 longitude format.
|
java.lang.String |
WKT_180180_ROI_Polygon()
Get the "Well Known Text" (WKT) representation of the region of interest
polygon converted to 180,-180 longitude foramt.
|
java.lang.String |
WKT_Centroid_Point()
Get the "Well Known Text" (WKT) representation of the centroid.
|
java.lang.String |
WKT_ROI_Polygon()
Get the "Well Known Text" (WKT) representation of the region of interest
polygon.
|
public static final java.lang.String ID
public Region_Of_Interest(java.lang.String planetocentric_roi)
public boolean ROI_Crosses_0_Longitude()
public static java.lang.String roi_string(java.util.Vector<java.util.Vector<java.lang.Double>> vertices)
vertices
- A Vector of Vectors containing longitude and latitude pairspublic Region_Of_Interest shift(double longitude_shift, double latitude_shift)
longitude_shift
- The amount of longitude each point should be shiftedlatitude_shift
- The amount of latitude each point should be shiftedpublic java.util.Vector<java.util.Vector<java.lang.Double>> shift_longitude_domain(java.util.Vector<java.util.Vector<java.lang.Double>> roi)
roi
- public double Minimum_Longitude(boolean shift_longitude_domain)
shift_longitude_domain
- - a boolean indicating if the longitude domain
should be shifted into the -180 to 180 domain prior to determining the minimum
longitude value.public double Maximum_Longitude(boolean shift_longitude_domain)
shift_longitude_domain
- - a boolean indicating if the longitude domain
should be shifted into the -180 to 180 domain prior to determining the minimum
longitude value.public double Minimum_Planetocentric_Latitude()
public double Maximum_Planetocentic_Latitude()
public double Signed_ROI_Area()
public double ROI_Area()
Signed_ROI_Area()
public java.util.Vector<java.lang.Double> ROI_Centroid()
public java.awt.geom.Point2D getCenter()
public boolean redundantPointsRemoved()
separationThreshold
public java.lang.String getWKT180180CenterPoint()
public java.lang.String WKT_Centroid_Point()
public java.lang.String WKT_180180_Centroid_Point()
public java.lang.String WKT_ROI_Polygon()
public java.lang.String WKT_180180_ROI_Polygon()
public java.lang.String Planetocentric_ROI_String()
public java.lang.String Planetographic_ROI_String()
public java.lang.String roif_polygon()
public java.util.Vector<java.util.Vector<java.lang.Double>> planetocentricROIVector()
public java.util.Vector<java.util.Vector<java.lang.Double>> planetographicROIVector()
public java.lang.String cipp_vertices()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean Contains(double longitude, double latitude, boolean shift_longitude_domain)
longitude
- of the test pointlatitude
- of the test pointshift_longitude_domain
- should the longitude domain be shifted from
0-360 to -180-180, useful if the roi straddles 0 degrees longitude.public static void main(java.lang.String[] args)
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona