visad.georef
Class TrivialMapProjection
- java.lang.Object
-
- visad.CoordinateSystem
-
- visad.georef.NavigatedCoordinateSystem
-
- visad.georef.MapProjection
-
- visad.georef.TrivialMapProjection
-
- All Implemented Interfaces:
- java.io.Serializable
public class TrivialMapProjection extends MapProjection
A trivial implementation for a MapProjection which provides an identity coordinate system with a default bounding box. This is useful for defining an area in LatLon or LonLat space with a bounding box. What goes in, comes right back out.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description TrivialMapProjection()Create a MapProjection that just returns the input tuple.TrivialMapProjection(RealTupleType reference)Create a MapProjection that just returns the input tuple.TrivialMapProjection(RealTupleType type, java.awt.geom.Rectangle2D bounds)Create a MapProjection that just returns the input tuple.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)See if the object in question is equal to this CoordinateSystem.double[][]fromReference(double[][] refTuple)Transform from the reference coordinatesfloat[][]fromReference(float[][] refTuple)Transform from the reference coordinatesjava.awt.geom.Rectangle2DgetDefaultMapArea()Get a reasonable bounding box in this coordinate system.double[][]toReference(double[][] tuple)Transform to the reference coordinatesfloat[][]toReference(float[][] tuple)Transform to the reference coordinates-
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
-
TrivialMapProjection
public TrivialMapProjection() throws VisADExceptionCreate a MapProjection that just returns the input tuple. Default Map area is set to be from (-180,-90) to (180, 90)- Throws:
VisADException- reference does not contain Latitude/Longitude or couldn't create the necessary VisAD object
-
TrivialMapProjection
public TrivialMapProjection(RealTupleType reference) throws VisADException
Create a MapProjection that just returns the input tuple.- Parameters:
reference- reference RealTupleType- Throws:
VisADException- reference does not contain Latitude/Longitude or couldn't create the necessary VisAD object
-
TrivialMapProjection
public TrivialMapProjection(RealTupleType type, java.awt.geom.Rectangle2D bounds) throws VisADException
Create a MapProjection that just returns the input tuple.- Parameters:
type- reference RealTupleTypebounds- rectangle bounds- Throws:
VisADException- reference does not contain Latitude/Longitude or couldn't create the necessary VisAD object
-
-
Method Detail
-
toReference
public double[][] toReference(double[][] tuple) throws VisADExceptionTransform to the reference coordinates- Specified by:
toReferencein classCoordinateSystem- Parameters:
tuple- array of values- Returns:
- input array
- Throws:
VisADException- tuple is null or wrong dimension
-
fromReference
public double[][] fromReference(double[][] refTuple) throws VisADExceptionTransform from the reference coordinates- Specified by:
fromReferencein classCoordinateSystem- Parameters:
refTuple- array of values- Returns:
- input array
- Throws:
VisADException- tuple is null or wrong dimension
-
toReference
public float[][] toReference(float[][] tuple) throws VisADExceptionTransform to the reference coordinates- Overrides:
toReferencein classCoordinateSystem- Parameters:
tuple- array of values- Returns:
- input array
- Throws:
VisADException- tuple is null or wrong dimension
-
fromReference
public float[][] fromReference(float[][] refTuple) throws VisADExceptionTransform from the reference coordinates- Overrides:
fromReferencein classCoordinateSystem- Parameters:
refTuple- array of values- Returns:
- input array
- Throws:
VisADException- tuple is null or wrong dimension
-
equals
public boolean equals(java.lang.Object o)
See if the object in question is equal to this CoordinateSystem. The two objects are equal if they are the same object or if they are both TrivialMapProjection and have the same dimension.- Specified by:
equalsin classCoordinateSystem- Parameters:
o- Object in question- Returns:
- true if they are considered equal, otherwise false.
-
getDefaultMapArea
public java.awt.geom.Rectangle2D getDefaultMapArea()
Get 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
-
-
DMelt 3.0 © DataMelt by jWork.ORG