public class RegionUtils extends Object
| Constructor and Description |
|---|
RegionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
getFractionInside(Region region,
Iterable<Location> locs)
The returns the fraction of points in the given collection of locations
that is inside the given region.
|
static Area |
getNodeShape(Location p,
double w,
double h)
Returns the
Region spanned by a node centered at the supplied
location with the given width and height. |
static void |
locListToKML(LocationList locs,
String filename,
Color c) |
static void |
main(String[] args) |
static void |
regionToKML(Region region,
String filename,
Color c) |
public static void regionToKML(Region region, String filename, Color c) throws ParserConfigurationException, TransformerConfigurationException, TransformerException
public static void locListToKML(LocationList locs, String filename, Color c) throws ParserConfigurationException, TransformerConfigurationException, TransformerException
public static double getFractionInside(Region region, Iterable<Location> locs) throws NullPointerException, IllegalArgumentException
GriddedSurfaces to determine the fraction of a fault surface that
is inside of a region.region - the region for which to testlocs - any instance of IterableNullPointerException - if region or locs is nullIllegalArgumentException - if locs is emptypublic static Area getNodeShape(Location p, double w, double h)
Region spanned by a node centered at the supplied
location with the given width and height.p - Location at center of a grid nodew - node widthh - node heightRegion