public class GeoUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
addressToolTip
Address tooltip
|
static java.lang.String |
lastAddress
Keep around the last address
|
Modifier and Type | Method and Description |
---|---|
static visad.georef.LatLonPoint |
getLocationFromAddress(java.lang.String address,
int[] master)
Look up the location of the given address
|
static visad.georef.LatLonPoint |
getLocationOfAddress()
Prompt the user for a street address and try to find its location.
|
static visad.georef.LatLonPoint |
getLocationOfAddress(javax.swing.JComponent extraComp)
Get the location of an address.
|
static java.util.List |
getSavedAddresses()
Get saved addresses
|
static void |
initAddressBox(javax.swing.JComboBox box)
Initialize the list of addresses in box
|
static visad.LinearLatLonSet |
latLonRectToSet(ucar.unidata.geoloc.LatLonRect rect)
Convert a LatLonRect to a LinearLatLonSet.
|
static void |
main(java.lang.String[] args)
Test main
|
static double |
normalizeLongitude(double lonValue)
Normalize a longitude value to the range between -180 and 180.
|
static double[] |
normalizeLongitude(double[] lonValues)
Normalize longitude values to the range between -180 and 180.
|
static float[] |
normalizeLongitude(float[] lonValues)
Normalize longitude values to the range between -180 and 180.
|
static double |
normalizeLongitude(Range lonRange,
double value)
Normalize a longitude between the range of the max/min.
|
static float |
normalizeLongitude(Range lonRange,
float value)
Normalize a longitude between the range of the max/min.
|
static double |
normalizeLongitude360(double lonValue)
Normalize a longitude value to the range between 0 and 360.
|
static double[] |
normalizeLongitude360(double[] lonValues)
Normalize longitude values to the range between 0 and 360.
|
static float[] |
normalizeLongitude360(float[] lonValues)
Normalize longitude values to the range between 0 and 360.
|
static void |
setSavedAddresses(java.util.List add)
set saved addresses
|
static visad.georef.EarthLocation |
toEarthLocation(visad.georef.LatLonPoint llp)
Create an EarthLocation with altitude 0 from the given llp
|
public static java.lang.String lastAddress
public static final java.lang.String addressToolTip
public static visad.georef.EarthLocation toEarthLocation(visad.georef.LatLonPoint llp) throws visad.VisADException, java.rmi.RemoteException
llp
- Locationjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic static visad.georef.LatLonPoint getLocationOfAddress()
public static visad.LinearLatLonSet latLonRectToSet(ucar.unidata.geoloc.LatLonRect rect) throws visad.VisADException
rect
- the LatLonRectvisad.VisADException
- Problem creating the setpublic static visad.georef.LatLonPoint getLocationOfAddress(javax.swing.JComponent extraComp)
extraComp
- the component to put the address in.public static visad.georef.LatLonPoint getLocationFromAddress(java.lang.String address, int[] master)
address
- The addressmaster
- masterpublic static java.util.List getSavedAddresses()
public static void setSavedAddresses(java.util.List add)
add
- list of addressespublic static void initAddressBox(javax.swing.JComboBox box)
box
- the box to add to.public static void main(java.lang.String[] args)
args
- argspublic static double normalizeLongitude(double lonValue)
lonValue
- longitude value to adjust (in degrees)public static double[] normalizeLongitude(double[] lonValues)
lonValues
- longitude values to adjust (in degrees)public static double normalizeLongitude(Range lonRange, double value)
lonRange
- the range of the longitudevalue
- the longitude valuepublic static float normalizeLongitude(Range lonRange, float value)
lonRange
- the range of the longitudevalue
- the longitude valuepublic static float[] normalizeLongitude(float[] lonValues)
lonValues
- longitude values to adjust (in degrees)public static double normalizeLongitude360(double lonValue)
lonValue
- longitude value to adjust (in degrees)public static double[] normalizeLongitude360(double[] lonValues)
lonValues
- longitude values to adjust (in degrees)public static float[] normalizeLongitude360(float[] lonValues)
lonValues
- longitude values to adjust (in degrees)