visad.data.hrit
Class HRITCoordinateSystem
- java.lang.Object
-
- visad.CoordinateSystem
-
- visad.georef.NavigatedCoordinateSystem
-
- visad.georef.MapProjection
-
- visad.data.hrit.HRITCoordinateSystem
-
- All Implemented Interfaces:
- java.io.Serializable
public class HRITCoordinateSystem extends MapProjection
HRITCoordinateSystem is a VisAD CoordinateSystem class used by HRITAdapter for conversions to/from (Latitude, Longitude) and Cartesian (element,line), and with Latitude and Longitude in degrees. It is currently modeled mostly after AREACoordinateSystem, so there are strong similarities between the two. In fact, for now this class does navigation exclusively through the McIDAS GEOS nav class.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description HRITCoordinateSystem(int[] iparms, int[] dir, boolean useSpline)create an HRIT coordinate system from the provided array of navigation parameters, and partially filled AREA directory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)Determines whether or not theObjectin question is the same as thisHRITCoordinateSystem.double[][]fromReference(double[][] tuples)convert from latitude,longitude to image element,linefloat[][]fromReference(float[][] tuples)convert from latitude,longitude to image element,lineint[]getAuxBlock()Get the navigation block used to initialize this HRITCoordinateSystemjava.awt.geom.Rectangle2DgetDefaultMapArea()Get the bounds for this imageint[]getDirBlock()Get the directory block used to initialize this HRITCoordinateSystemint[]getNavBlock()Get the navigation block used to initialize this HRITCoordinateSystemdouble[]getSubpoint()get the subpoint if availablebooleangetUseSpline()Get whether we are using a spline or notdouble[][]toReference(double[][] tuples)convert from image element,line to latitude,longitudefloat[][]toReference(float[][] tuples)convert from image element,line to latitude,longitudejava.lang.StringtoString()Return a String which tells some info about this navigation-
Methods inherited from class visad.georef.MapProjection
getCenterLatLon, getLatLon, getXIndex, getYIndex, isLatLonOrder, isXYOrder
-
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
-
HRITCoordinateSystem
public HRITCoordinateSystem(int[] iparms, int[] dir, boolean useSpline) throws VisADExceptioncreate an HRIT coordinate system from the provided array of navigation parameters, and partially filled AREA directory. This routine uses a flipped Y axis (first line of the image file is number 0)- Parameters:
iparms- init params?dir- is the AREA file directory blockuseSpline- use a spline approximation for speed- Throws:
VisADException
-
-
Method Detail
-
getDirBlock
public int[] getDirBlock()
Get the directory block used to initialize this HRITCoordinateSystem
-
getNavBlock
public int[] getNavBlock()
Get the navigation block used to initialize this HRITCoordinateSystem
-
getAuxBlock
public int[] getAuxBlock()
Get the navigation block used to initialize this HRITCoordinateSystem
-
getSubpoint
public double[] getSubpoint()
get the subpoint if available
-
getUseSpline
public boolean getUseSpline()
Get whether we are using a spline or not
-
toReference
public double[][] toReference(double[][] tuples) throws VisADExceptionconvert from image element,line to latitude,longitude- Specified by:
toReferencein classCoordinateSystem- Parameters:
tuples- contains the element,line pairs to convert- Returns:
- array of double values in reference coordinates and Units.
- Throws:
VisADException- if problem with conversion.
-
fromReference
public double[][] fromReference(double[][] tuples) throws VisADExceptionconvert from latitude,longitude to image element,line- Specified by:
fromReferencein classCoordinateSystem- Parameters:
tuples- contains the element,line pairs to convert- Returns:
- array of double values in CoordinateSystem Units.
- Throws:
VisADException- if problem with conversion.
-
toReference
public float[][] toReference(float[][] tuples) throws VisADExceptionconvert from image element,line to latitude,longitude- Overrides:
toReferencein classCoordinateSystem- Parameters:
tuples- contains the element,line pairs to convert- Returns:
- array of float values in reference coordinates and Units.
- Throws:
VisADException- if problem with conversion.
-
fromReference
public float[][] fromReference(float[][] tuples) throws VisADExceptionconvert from latitude,longitude to image element,line- Overrides:
fromReferencein classCoordinateSystem- Parameters:
tuples- contains the element,line pairs to convert- Returns:
- array of float values in this CoordinateSystem Units.
- Throws:
VisADException- if problem with conversion.
-
getDefaultMapArea
public java.awt.geom.Rectangle2D getDefaultMapArea()
Get the bounds for this image- Specified by:
getDefaultMapAreain classMapProjection- Returns:
- the bounding box of the MapProjection
-
equals
public boolean equals(java.lang.Object obj)
Determines whether or not theObjectin question is the same as thisHRITCoordinateSystem. The specifiedObjectis equal to thisHRITCoordinateSystemif it is an instance ofHRITCoordinateSystemand it has the same navigation module and default map area as this one.- Specified by:
equalsin classCoordinateSystem- Parameters:
obj- the Object in question- Returns:
trueif and only if this instance equals cs.
-
toString
public java.lang.String toString()
Return a String which tells some info about this navigation- Overrides:
toStringin classMapProjection- Returns:
- wordy String
-
-
DMelt 3.0 © DataMelt by jWork.ORG