|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.data.xyz.AbstractXYZ_DataSet
org.opensha.commons.data.xyz.AbstractGeoDataSet
org.opensha.commons.data.xyz.ArbDiscrGeoDataSet
public class ArbDiscrGeoDataSet
This class represents an arbitrarily discretized geographic dataset. It is backed by Locations (in a HashMap). This should be used for scattered XYZ data or maps where it is impractical or unnecessary to use the evenly discretized version.
| Constructor Summary | |
|---|---|
ArbDiscrGeoDataSet(boolean latitudeX)
|
|
| Method Summary | |
|---|---|
Object |
clone()
|
boolean |
contains(Location loc)
Returns true if the dataset contains the given Location, false otherwise. |
ArbDiscrGeoDataSet |
copy()
Returns a shallow copy of this GeoDataSet. |
double |
get(Location loc)
Get the value at the given Location, or null if it doesn't exist. |
Location |
getLocation(int index)
Returns the location at the given index. |
LocationList |
getLocationList()
Returns a list of all locations in the correct order (as defined by indexOf). |
int |
indexOf(Location loc)
Returns the index of the given location, or -1 if it doesn't exist. |
static ArbDiscrGeoDataSet |
loadXYZFile(String fileName,
boolean latitudeX)
|
void |
set(Location loc,
double value)
Set the value at the given Location. |
int |
size()
Returns the size of this dataset. |
static void |
writeXYZFile(XYZ_DataSet xyz,
String fileName)
|
| Methods inherited from class org.opensha.commons.data.xyz.AbstractGeoDataSet |
|---|
contains, contains, get, get, get, getMaxLat, getMaxLon, getMaxX, getMaxY, getMaxZ, getMinLat, getMinLon, getMinX, getMinY, getMinZ, getPoint, getPointList, getValueList, getZTracker, indexOf, indexOf, isLatitudeX, locToPoint, ptToLoc, set, set, set, setAll, setLatitudeX |
| Methods inherited from class org.opensha.commons.data.xyz.AbstractXYZ_DataSet |
|---|
abs, add, exp, exp, log, log10, pow, scale, writeXYZFile |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensha.commons.data.xyz.XYZ_DataSet |
|---|
abs, add, exp, exp, log, log10, pow, scale |
| Constructor Detail |
|---|
public ArbDiscrGeoDataSet(boolean latitudeX)
| Method Detail |
|---|
public void set(Location loc,
double value)
GeoDataSetLocation. If the location doesn't exist in the
dataset then it will be added.
loc - - the location at which to setvalue - - the value to setpublic double get(Location loc)
GeoDataSetLocation, or null if it doesn't exist.
loc - - the location at which to get
public int indexOf(Location loc)
GeoDataSet
loc - - the location at which to return the index
public Location getLocation(int index)
GeoDataSet
index - - the index at which to get the location
public boolean contains(Location loc)
GeoDataSet
loc - - the location to test
public static ArbDiscrGeoDataSet loadXYZFile(String fileName,
boolean latitudeX)
throws FileNotFoundException,
IOException
FileNotFoundException
IOException
public static void writeXYZFile(XYZ_DataSet xyz,
String fileName)
throws IOException
IOExceptionpublic Object clone()
clone in class Objectpublic ArbDiscrGeoDataSet copy()
GeoDataSetGeoDataSet. Internal points are not cloned.
GeoDataSetpublic LocationList getLocationList()
GeoDataSet
public int size()
XYZ_DataSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||