visad.georef
Class LongitudeLatitudeInterpCS
- java.lang.Object
-
- visad.CoordinateSystem
-
- visad.georef.NavigatedCoordinateSystem
-
- visad.georef.MapProjection
-
- visad.georef.LongitudeLatitudeInterpCS
-
- All Implemented Interfaces:
- java.io.Serializable
public class LongitudeLatitudeInterpCS extends MapProjection
For 2D arrays of earth observations when the navigation is not provided analytically, but a set of navigated points is given to interpolate. Particularly useful for polar swath observations with point-by-point navigation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description LongitudeLatitudeInterpCS(Linear2DSet domainSet, Gridded2DSet lonlatSet)LongitudeLatitudeInterpCS(Linear2DSet domainSet, Gridded2DSet lonlatSet, boolean neg180pos180)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object cs)Indicates whether or not this instance is equal to an object (note must test for cs == null).double[][]fromReference(double[][] lonlat)Convert RealTuple values from Reference coordinates; for efficiency, input and output values are passed as double[][] arrays rather than RealTuple[] arrays; the array organization is double[tuple_dimension][number_of_tuples]; can modify and return argument array.float[][]fromReference(float[][] lonlat)Convert RealTuple values from Reference coordinates; for efficiency, input and output values are passed as float[][] arrays rather than RealTuple[] arrays; the array organization is float[tuple_dimension][number_of_tuples]; can modify and return argument array.java.awt.geom.Rectangle2DgetDefaultMapArea()Get a reasonable bounding box in this coordinate system.Linear2DSetgetDomainSet()booleangetIsExtNeg180pos180()booleangetIsNeg180pos180()Gridded2DSetgetLonLatSet()voidsetExternalLongitudeRange(boolean isExtNeg180pos180)voidsetIsExtNeg180pos180(boolean yesno)Will convert to external (incoming/outgoing) longitude range, ie.double[][]toReference(double[][] values)Convert RealTuple values to Reference coordinates; for efficiency, input and output values are passed as double[][] arrays rather than RealTuple[] arrays; the array organization is double[tuple_dimension][number_of_tuples]; can modify and return argument array.float[][]toReference(float[][] values)Convert RealTuple values to Reference coordinates; for efficiency, input and output values are passed as float[][] arrays rather than RealTuple[] arrays; the array organization is float[tuple_dimension][number_of_tuples]; can modify and return argument array.-
Methods inherited from class visad.georef.MapProjection
getCenterLatLon, getLatLon, getXIndex, getYIndex, isLatLonOrder, isXYOrder, toString
-
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
-
-
-
-
Constructor Detail
-
LongitudeLatitudeInterpCS
public LongitudeLatitudeInterpCS(Linear2DSet domainSet, Gridded2DSet lonlatSet, boolean neg180pos180) throws VisADException
- Parameters:
domainSet- The CoordinateSystem, eg. (line, element), (Track, XTrack)lonlatSet- The set of earth locations to interpolate for (x,y) to/from (lon,lat). May be sampled w/respect to domainSet, eg. every fifth point. SetType must be SpatialEarth2DTuple or LatitudeLongitudeTuple.neg180pos180- The range of longitude values in the lonlatSet. Default is true, false is (0,+360).- Throws:
VisADException- Couldn't create necessary VisAD object or reference type (the lonlatSet type) is not SpatialEarth2DTuple or LatitudeLongitudeTuple
-
LongitudeLatitudeInterpCS
public LongitudeLatitudeInterpCS(Linear2DSet domainSet, Gridded2DSet lonlatSet) throws VisADException
- Throws:
VisADException
-
-
Method Detail
-
toReference
public float[][] toReference(float[][] values) throws VisADExceptionDescription copied from class:CoordinateSystemConvert RealTuple values to Reference coordinates; for efficiency, input and output values are passed as float[][] arrays rather than RealTuple[] arrays; the array organization is float[tuple_dimension][number_of_tuples]; can modify and return argument array. This implementation converts the input array to doubles and callsCoordinateSystem.toReference(double[][])and then returns that converted double array back as a float array. For efficiency, subclasses should override this implementation.- Overrides:
toReferencein classCoordinateSystem- Parameters:
values- array of values assumed to be in coordinateSystem units. Input array is not guaranteed to be immutable and could be used for return.- Returns:
- array of float values in reference coordinates and Units.
- Throws:
VisADException- if problem with conversion.
-
toReference
public double[][] toReference(double[][] values) throws VisADExceptionDescription copied from class:CoordinateSystemConvert RealTuple values to Reference coordinates; for efficiency, input and output values are passed as double[][] arrays rather than RealTuple[] arrays; the array organization is double[tuple_dimension][number_of_tuples]; can modify and return argument array.- Specified by:
toReferencein classCoordinateSystem- Parameters:
values- array of values assumed to be in coordinateSystem units. Input array is not guaranteed to be immutable and could be used for return.- Returns:
- array of double values in reference coordinates and Units.
- Throws:
VisADException- if problem with conversion.
-
fromReference
public float[][] fromReference(float[][] lonlat) throws VisADExceptionDescription copied from class:CoordinateSystemConvert RealTuple values from Reference coordinates; for efficiency, input and output values are passed as float[][] arrays rather than RealTuple[] arrays; the array organization is float[tuple_dimension][number_of_tuples]; can modify and return argument array. This implementation converts the input array to doubles and callsCoordinateSystem.toReference(double[][])and then returns that converted double array back as a float array. For efficiency, subclasses should override this implementation.- Overrides:
fromReferencein classCoordinateSystem- Parameters:
lonlat- array of values assumed to be in reference Units. Input array is not guaranteed to be immutable and could be used for return.- Returns:
- array of float values in this CoordinateSystem Units.
- Throws:
VisADException- if problem with conversion.
-
fromReference
public double[][] fromReference(double[][] lonlat) throws VisADExceptionDescription copied from class:CoordinateSystemConvert RealTuple values from Reference coordinates; for efficiency, input and output values are passed as double[][] arrays rather than RealTuple[] arrays; the array organization is double[tuple_dimension][number_of_tuples]; can modify and return argument array.- Specified by:
fromReferencein classCoordinateSystem- Parameters:
lonlat- array of values assumed to be in reference Units. Input array is not guaranteed to be immutable and could be used for return.- Returns:
- array of double values in CoordinateSystem Units.
- Throws:
VisADException- if problem with conversion.
-
setExternalLongitudeRange
public void setExternalLongitudeRange(boolean isExtNeg180pos180)
-
getDefaultMapArea
public java.awt.geom.Rectangle2D getDefaultMapArea()
Description copied from class:MapProjectionGet a reasonable bounding box in this coordinate system. MapProjections are typically specific to an area of the world; there's no bounding box that works for all projections so each subclass must implement this method. For example, the bounding box for a satellite image MapProjection might have an upper left corner of (0,0) and the width and height of the Rectangle2D would be the number of elements and lines, respectively.- Specified by:
getDefaultMapAreain classMapProjection- Returns:
- the bounding box of the MapProjection
-
getDomainSet
public Linear2DSet getDomainSet()
-
getLonLatSet
public Gridded2DSet getLonLatSet()
-
getIsNeg180pos180
public boolean getIsNeg180pos180()
-
setIsExtNeg180pos180
public void setIsExtNeg180pos180(boolean yesno)
Will convert to external (incoming/outgoing) longitude range, ie. -180 to 180 back/forth to 0 to 360. Default is: external range is 0 to 360
-
getIsExtNeg180pos180
public boolean getIsExtNeg180pos180()
-
equals
public boolean equals(java.lang.Object cs)
Description copied from class:CoordinateSystemIndicates whether or not this instance is equal to an object (note must test for cs == null).- Specified by:
equalsin classCoordinateSystem- Parameters:
cs- the object in question.- Returns:
trueif and only if this instance equals cs.
-
-
DMelt 3.0 © DataMelt by jWork.ORG