|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjecthydroScalingAPI.io.MetaPolygon
public class MetaPolygon
This class interacts with *.poly files. It reads their contents and produce appropriate outputs for graphic and other purposes.
| Constructor Summary | |
|---|---|
MetaPolygon()
Creates a new instance of MetaPolygon with an empty set of properties |
|
MetaPolygon(java.io.File file)
Creates a new instance of MetaPolygon with a set of properties determined by a file |
|
MetaPolygon(java.lang.String file)
Creates a new instance of MetaPolygon with a set of properties determined by a file |
|
| Method Summary | |
|---|---|
double |
getAverage(visad.FlatField localField)
Calculates the average value of a spatially variable field inside the polygon |
java.io.File |
getLocationMeta()
Returns the File with information used to create the MetaPolygon |
float[][] |
getLonLatPolygon()
Returns a float array with the longitudes and latitudes of the points that describe the polygon |
java.lang.String |
getName()
Returns the Name associated with the polygon |
visad.Gridded2DSet |
getPolygon()
Creates and returns a visad.Gridded2DSet ready to be added into a visad.Display |
java.lang.String |
getProperty(java.lang.String prop)
Returns the value of the property. |
static void |
main(java.lang.String[] args)
Tests for the class |
void |
setCoordinates(float[][] newXYCoords)
Sets the coordinates of the polygon to using a float array |
void |
setInformation(java.lang.String newInformation)
Sets the [information] property to the specified value |
void |
setName(java.lang.String newName)
Sets the [name] property to the specified value |
java.lang.String |
toString()
Returns a string describing this MetaPolygon |
void |
writeKmlPolygon(java.io.File newKmlLocation)
Writes an *.kml file in the specified path |
void |
writePolygon(java.io.File newMetaLocation)
Writes an *.poly file in the specified path |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MetaPolygon()
public MetaPolygon(java.lang.String file)
throws java.io.IOException
file - A String with the path to the file that contains the properties of the Polygon
java.io.IOException - Errors while reading the *.poly file
public MetaPolygon(java.io.File file)
throws java.io.IOException
file - The file that contains the properties of the Polygon
java.io.IOException - Errors while reading the *.poly file| Method Detail |
|---|
public java.lang.String getProperty(java.lang.String prop)
prop - The desired property
public visad.Gridded2DSet getPolygon()
throws visad.VisADException
visad.VisADException - Captures errors while creating the Gidded2DSetpublic float[][] getLonLatPolygon()
public java.lang.String getName()
public java.io.File getLocationMeta()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setName(java.lang.String newName)
newName - The value to assign to the [name] fieldpublic void setCoordinates(float[][] newXYCoords)
newXYCoords - The array with coordinatespublic void setInformation(java.lang.String newInformation)
newInformation - The value to assign to the [information] fieldpublic double getAverage(visad.FlatField localField)
localField - The visad.FlatField to be integrated
public void writePolygon(java.io.File newMetaLocation)
throws java.io.IOException
newMetaLocation - The File descriptor where the information will be written.
java.io.IOException - Captures errors while writing the file
public void writeKmlPolygon(java.io.File newKmlLocation)
throws java.io.IOException
newKmlLocation - The File descriptor where the information will be written.
java.io.IOException - Captures errors while writing the filepublic static void main(java.lang.String[] args)
args - the command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.