visad.bom
Class Radar2DCoordinateSystem

java.lang.Object
  extended by visad.CoordinateSystem
      extended by visad.georef.NavigatedCoordinateSystem
          extended by visad.bom.Radar2DCoordinateSystem
All Implemented Interfaces:
Serializable

public class Radar2DCoordinateSystem
extends NavigatedCoordinateSystem

Radar2DCoordinateSystem is the VisAD CoordinateSystem class for radar (range, azimuth) with an Earth (Latitude, Longitude) Reference, and with azimuth in degrees and range in meters.

See Also:
Serialized Form

Constructor Summary
Radar2DCoordinateSystem(float clat, float clon)
          construct a CoordinateSystem for (range, azimuth) relative to an Earth (Latitude, Longitude) Reference; this constructor supplies units = {CommonUnit.meter, CommonUnit.degree} to the super constructor, in order to ensure Unit compatibility with its use of trigonometric functions.
Radar2DCoordinateSystem(float clat, float clon, float radl, float radr, float azl, float azr)
          construct a CoordinateSystem for (range, azimuth) relative to an Earth (Latitude, Longitude) Reference; this constructor supplies units = {CommonUnit.meter, CommonUnit.degree} to the super constructor, in order to ensure Unit compatibility with its use of trigonometric functions.
Radar2DCoordinateSystem(RealTupleType reference, float clat, float clon, float radl, float radr, float azl, float azr)
          construct a CoordinateSystem for (range, azimuth) relative to an Earth (Latitude, Longitude) Reference; this constructor supplies units = {CommonUnit.meter, CommonUnit.degree} to the super constructor, in order to ensure Unit compatibility with its use of trigonometric functions.
 
Method Summary
 boolean equals(Object cs)
          Check to see if this is a Radar2DCoordinateSystem
 double[][] fromReference(double[][] tuples)
          Convert from latitude/longitude to range/azimuth.
 float[][] fromReference(float[][] tuples)
          Convert from latitude/longitude to range/azimuth.
 float[] getAzimuthParameters()
          Return the azimuth parameters
 float[] getCenterPoint()
          Get center point in lat/lon
 float[] getRangeParameters()
          Return the range parameters
 double[][] toReference(double[][] tuples)
          Convert from range/azimuth to latitude/longitude.
 float[][] toReference(float[][] tuples)
          Convert from range/azimuth to latitude/longitude.
 String toString()
          Return String representation of this Radar2DCoordinateSystem
 
Methods inherited from class visad.georef.NavigatedCoordinateSystem
getLatitudeIndex, getLongitudeIndex
 
Methods inherited from class visad.CoordinateSystem
canConvert, fromReference, fromReference, getCoordinateSystemUnits, getDimension, getReference, getReferenceUnits, toReference, toReference, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinatesFreeUnits, transformCoordinatesFreeUnits
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Radar2DCoordinateSystem

public Radar2DCoordinateSystem(float clat,
                               float clon)
                        throws VisADException
construct a CoordinateSystem for (range, azimuth) relative to an Earth (Latitude, Longitude) Reference; this constructor supplies units = {CommonUnit.meter, CommonUnit.degree} to the super constructor, in order to ensure Unit compatibility with its use of trigonometric functions. Values of range and azimuth are in terms of absolute values of range and azimuth away from the center point where range is in meters and azimuth = 0 at north.

Parameters:
clat - latitude of center point
clon - longitude of center point
Throws:
VisADException - necessary VisAD object couldn't be created.

Radar2DCoordinateSystem

public Radar2DCoordinateSystem(float clat,
                               float clon,
                               float radl,
                               float radr,
                               float azl,
                               float azr)
                        throws VisADException
construct a CoordinateSystem for (range, azimuth) relative to an Earth (Latitude, Longitude) Reference; this constructor supplies units = {CommonUnit.meter, CommonUnit.degree} to the super constructor, in order to ensure Unit compatibility with its use of trigonometric functions. Values of range and azimuth are in terms of multiples of range and azimuth resolutions away from the low value (radl, azl). The absolute range is (radl + range_value * radr) and the absolute azimuth is (azl + azimuth_value * azr) with azimuth = 0 at north. This allows the use of Integer2DSets for the values assuming linear spacing of range and azimuth.

Parameters:
clat - latitude of center point
clon - longitude of center point
radl - distance from center point for first possible echo (meters)
radr - distance between subsequent radials (meters)
azl - starting azimuth (degrees)
azr - resolution of degrees between azimuths.
Throws:
VisADException - necessary VisAD object couldn't be created.

Radar2DCoordinateSystem

public Radar2DCoordinateSystem(RealTupleType reference,
                               float clat,
                               float clon,
                               float radl,
                               float radr,
                               float azl,
                               float azr)
                        throws VisADException
construct a CoordinateSystem for (range, azimuth) relative to an Earth (Latitude, Longitude) Reference; this constructor supplies units = {CommonUnit.meter, CommonUnit.degree} to the super constructor, in order to ensure Unit compatibility with its use of trigonometric functions. Values of range and azimuth are in terms of multiples of range and azimuth resolutions away from the low value (radl, azl). The absolute range is (radl + range_value * radr) and the absolute azimuth is (azl + azimuth_value * azr) with azimuth = 0 at north. This allows the use of Integer2DSets for the values assuming linear spacing of range and azimuth.

Parameters:
reference - reference RealTupleType (should be RealTupleType.LatitudeLongitudeTuple)
clat - latitude of center point
clon - longitude of center point
radl - distance from center point for first possible echo (meters)
radr - distance between subsequent radials (meters)
azl - starting azimuth (degrees)
azr - resolution of degrees between azimuths.
Throws:
VisADException - necessary VisAD object couldn't be created.
Method Detail

toReference

public double[][] toReference(double[][] tuples)
                       throws VisADException
Convert from range/azimuth to latitude/longitude. Values input are in terms of multiples of the value resolution from the low value (ex: low + value * resolution).

Specified by:
toReference in class CoordinateSystem
Parameters:
tuples - range/azimuth values
Returns:
lat/lon values
Throws:
VisADException - tuples is null or wrong dimension

fromReference

public double[][] fromReference(double[][] tuples)
                         throws VisADException
Convert from latitude/longitude to range/azimuth. Returned values are in terms of multiples of the value resolution from the low value (ex: low + value * resolution).

Specified by:
fromReference in class CoordinateSystem
Parameters:
tuples - lat/lon values
Returns:
range/azimuth values
Throws:
VisADException - tuples is null or wrong dimension

toReference

public float[][] toReference(float[][] tuples)
                      throws VisADException
Convert from range/azimuth to latitude/longitude. Values input are in terms of multiples of the value resolution from the low value (ex: low + value * resolution).

Overrides:
toReference in class CoordinateSystem
Parameters:
tuples - range/azimuth values
Returns:
lat/lon values
Throws:
VisADException - tuples is null or wrong dimension

fromReference

public float[][] fromReference(float[][] tuples)
                        throws VisADException
Convert from latitude/longitude to range/azimuth. Returned values are in terms of multiples of the value resolution from the low value (ex: low + value * resolution).

Overrides:
fromReference in class CoordinateSystem
Parameters:
tuples - lat/lon values
Returns:
range/azimuth values
Throws:
VisADException - tuples is null or wrong dimension

equals

public boolean equals(Object cs)
Check to see if this is a Radar2DCoordinateSystem

Specified by:
equals in class CoordinateSystem
Parameters:
cs - object to compare
Returns:
true if cs is an instance of Radar2DCoordinateSystem

getAzimuthParameters

public float[] getAzimuthParameters()
Return the azimuth parameters

Returns:
array[] (len == 2) where array[0] = azl, array[1] = azr

getRangeParameters

public float[] getRangeParameters()
Return the range parameters

Returns:
array[] (len == 2) where array[0] = radl, array[1] = radr

getCenterPoint

public float[] getCenterPoint()
Get center point in lat/lon

Returns:
latlon array where array[0] = lat, array[1] = lon

toString

public String toString()
Return String representation of this Radar2DCoordinateSystem

Overrides:
toString in class Object
Returns:
string listing params