Package ucar.unidata.view.geoloc
Class MapProjectionDisplay.MapProjection3DAdapter
java.lang.Object
visad.CoordinateSystem
ucar.unidata.view.geoloc.MapProjectionDisplay.MapProjection3DAdapter
- All Implemented Interfaces:
Serializable,InverseLinearScaledCS
- Enclosing class:
MapProjectionDisplay
protected class MapProjectionDisplay.MapProjection3DAdapter
extends CoordinateSystem
implements InverseLinearScaledCS
An adapter for visad.georef.MapProjection coordinate systems (ie:
ones with * a reference of Lat/Lon). Allows for the conversion from
lat/lon to Display.DisplaySpatialCartesianTuple (XYZ).
Altitude (z) values are held constant.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMapProjection3DAdapter(MapProjection mapProjection) Construct a new CoordinateSystem which uses a MapProjection for the transformations between x,y and lat/lon. -
Method Summary
Modifier and TypeMethodDescriptionbooleanSee if this is equal to the object in question.double[][]fromReference(double[][] xyz) Transform display XYZ values to latitude/longitude/altitudefloat[][]fromReference(float[][] xyz) Transform display XYZ values to latitude/longitude/altitudeGet the inverted coordinate systemReturn the MapProjection being used by the CoordinateSystem.double[]Get the offsetdouble[]getScale()Get the scaledouble[][]toReference(double[][] latlonalt) Transform latitude/longitude/altitude value to XYZfloat[][]toReference(float[][] latlonalt) Transform latitude/longitude/altitude value to XYZMethods inherited from class visad.CoordinateSystem
canConvert, fromReference, fromReference, getCoordinateSystemUnits, getDimension, getReference, getReferenceUnits, toReference, toReference, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinatesFreeUnits, transformCoordinatesFreeUnits
-
Constructor Details
-
MapProjection3DAdapter
Construct a new CoordinateSystem which uses a MapProjection for the transformations between x,y and lat/lon.- Parameters:
mapProjection- CoordinateSystem that transforms from xy in the data space to lat/lon.- Throws:
VisADException- can't create the necessary VisAD object
-
-
Method Details
-
toReference
Transform latitude/longitude/altitude value to XYZ- Specified by:
toReferencein classCoordinateSystem- Parameters:
latlonalt- array of latitude, longitude, altitude values- Returns:
- array of display xyz values.
- Throws:
VisADException- can't create the necessary VisAD object
-
toReference
Transform latitude/longitude/altitude value to XYZ- Overrides:
toReferencein classCoordinateSystem- Parameters:
latlonalt- array of latitude, longitude, altitude values- Returns:
- array of display xyz values.
- Throws:
VisADException- can't create the necessary VisAD object
-
fromReference
Transform display XYZ values to latitude/longitude/altitude- Specified by:
fromReferencein classCoordinateSystem- Parameters:
xyz- array of Display.DisplaySpatialCartesianTuple XYZ values- Returns:
- array of display lat/lon/alt values.
- Throws:
VisADException- can't create the necessary VisAD object
-
fromReference
Transform display XYZ values to latitude/longitude/altitude- Overrides:
fromReferencein classCoordinateSystem- Parameters:
xyz- array of Display.DisplaySpatialCartesianTuple XYZ values- Returns:
- array of display lat/lon/alt values.
- Throws:
VisADException- can't create the necessary VisAD object
-
equals
See if this is equal to the object in question.- Specified by:
equalsin classCoordinateSystem- Parameters:
obj- object in question.- Returns:
- true if they are equal. The two objects are equal if their MapProjections are equal.
-
getMapProjection
Return the MapProjection being used by the CoordinateSystem.- Returns:
- the MapProjection used in this instance
-
getScale
public double[] getScale()Get the scale- Specified by:
getScalein interfaceInverseLinearScaledCS- Returns:
- the scale (x,y)
-
getOffset
public double[] getOffset()Get the offset- Specified by:
getOffsetin interfaceInverseLinearScaledCS- Returns:
- the offset (x_off, y_off)
-
getInvertedCoordinateSystem
Get the inverted coordinate system- Specified by:
getInvertedCoordinateSystemin interfaceInverseLinearScaledCS- Returns:
- the inverted coordinate system
-