Package ucar.nc2.iosp.mcidas
Class McIDASAreaProjection
- java.lang.Object
-
- ucar.unidata.geoloc.ProjectionImpl
-
- ucar.nc2.iosp.mcidas.McIDASAreaProjection
-
- All Implemented Interfaces:
Serializable,ucar.unidata.geoloc.Projection
public class McIDASAreaProjection extends ucar.unidata.geoloc.ProjectionImplMcIDASAreaProjection is the ProjectionImpl for McIDAS Area navigation modules.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_AREADIRAttribute for the Area Directorystatic StringATTR_AUXBLOCKAttribute for the Navigation Blockstatic StringATTR_NAVBLOCKAttribute for the Navigation Blockstatic StringGRID_MAPPING_NAMEAttribute for the Navigation Block
-
Constructor Summary
Constructors Constructor Description McIDASAreaProjection()Default bean constructorMcIDASAreaProjection(int[] dir, int[] nav, int[] aux)Create a AREA coordinate system from the Area file's directory and navigation blocks.McIDASAreaProjection(ucar.mcidas.AreaFile af)create a McIDAS AREA projection from the Area file's directory and navigation blocks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ucar.unidata.geoloc.ProjectionImplconstructCopy()copy constructor - avoid clone !!booleancrossSeam(ucar.unidata.geoloc.ProjectionPoint pt1, ucar.unidata.geoloc.ProjectionPoint pt2)This returns true when the line between pt1 and pt2 crosses the seam.booleanequals(Object o)int[]getAuxBlock()Get the auxilliary block used to initialize this McIDASAreaProjectionucar.unidata.geoloc.ProjectionRectgetDefaultMapArea()Get the bounds for this imageint[]getDirBlock()Get the directory block used to initialize this McIDASAreaProjectionint[]getNavBlock()Get the navigation block used to initialize this McIDASAreaProjectioninthashCode()double[][]latLonToProj(double[][] from, double[][] to, int latIndex, int lonIndex)Convert lat/lon coordinates to projection coordinates.float[][]latLonToProj(float[][] from, float[][] to, int latIndex, int lonIndex)Convert lat/lon coordinates to projection coordinates.ucar.unidata.geoloc.ProjectionPointlatLonToProj(ucar.unidata.geoloc.LatLonPoint latLon, ucar.unidata.geoloc.ProjectionPointImpl result)Convert a LatLonPoint to projection coordinatesStringparamsToString()Get the parameters as a Stringdouble[][]projToLatLon(double[][] from, double[][] to)Convert lat/lon coordinates to projection coordinates.float[][]projToLatLon(float[][] from, float[][] to)Convert lat/lon coordinates to projection coordinates.ucar.unidata.geoloc.LatLonPointprojToLatLon(ucar.unidata.geoloc.ProjectionPoint world, ucar.unidata.geoloc.LatLonPointImpl result)Convert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.StringtoString()Return a String which tells some info about this navigation-
Methods inherited from class ucar.unidata.geoloc.ProjectionImpl
addParameter, addParameter, addParameter, findProjectionParameter, getClassName, getDefaultMapAreaLL, getHeader, getName, getProjectionParameters, getProjectionTypeLabel, isLatLon, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProjBB, projToLatLon, projToLatLon, projToLatLon, projToLatLonBB, projToLatLonBBold, setDefaultMapArea, setName
-
-
-
-
Field Detail
-
ATTR_AREADIR
public static String ATTR_AREADIR
Attribute for the Area Directory
-
ATTR_NAVBLOCK
public static String ATTR_NAVBLOCK
Attribute for the Navigation Block
-
ATTR_AUXBLOCK
public static String ATTR_AUXBLOCK
Attribute for the Navigation Block
-
GRID_MAPPING_NAME
public static String GRID_MAPPING_NAME
Attribute for the Navigation Block
-
-
Constructor Detail
-
McIDASAreaProjection
public McIDASAreaProjection()
Default bean constructor
-
McIDASAreaProjection
public McIDASAreaProjection(ucar.mcidas.AreaFile af)
create a McIDAS AREA projection from the Area file's directory and navigation blocks. This routine uses a flipped Y axis (first line of the image file is number 0)- Parameters:
af- is the associated AreaFile
-
McIDASAreaProjection
public McIDASAreaProjection(int[] dir, int[] nav, int[] aux)Create a AREA coordinate system from the Area file's directory and navigation blocks. This routine uses a flipped Y axis (first line of the image file is number 0)- Parameters:
dir- is the AREA file directory blocknav- is the AREA file navigation blockaux- is the AREA file auxillary block
-
-
Method Detail
-
constructCopy
public ucar.unidata.geoloc.ProjectionImpl constructCopy()
copy constructor - avoid clone !!- Specified by:
constructCopyin classucar.unidata.geoloc.ProjectionImpl- Returns:
- construct a copy of this
-
getDirBlock
public int[] getDirBlock()
Get the directory block used to initialize this McIDASAreaProjection- Returns:
- the area directory
-
getNavBlock
public int[] getNavBlock()
Get the navigation block used to initialize this McIDASAreaProjection- Returns:
- the navigation block
-
getAuxBlock
public int[] getAuxBlock()
Get the auxilliary block used to initialize this McIDASAreaProjection- Returns:
- the auxilliary block (may be null)
-
latLonToProj
public ucar.unidata.geoloc.ProjectionPoint latLonToProj(ucar.unidata.geoloc.LatLonPoint latLon, ucar.unidata.geoloc.ProjectionPointImpl result)Convert a LatLonPoint to projection coordinates- Specified by:
latLonToProjin interfaceucar.unidata.geoloc.Projection- Specified by:
latLonToProjin classucar.unidata.geoloc.ProjectionImpl- Parameters:
latLon- convert from these lat, lon coordinatesresult- the object to write to- Returns:
- the given result
-
projToLatLon
public ucar.unidata.geoloc.LatLonPoint projToLatLon(ucar.unidata.geoloc.ProjectionPoint world, ucar.unidata.geoloc.LatLonPointImpl result)Convert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.- Specified by:
projToLatLonin interfaceucar.unidata.geoloc.Projection- Specified by:
projToLatLonin classucar.unidata.geoloc.ProjectionImpl- Parameters:
world- convert from these projection coordinatesresult- the object to write to- Returns:
- LatLonPoint convert to these lat/lon coordinates
-
latLonToProj
public float[][] latLonToProj(float[][] from, float[][] to, int latIndex, int lonIndex)Convert lat/lon coordinates to projection coordinates.- Overrides:
latLonToProjin classucar.unidata.geoloc.ProjectionImpl- Parameters:
from- array of lat/lon coordinates: from[2][n], where from[0][i], from[1][i] is the (lat,lon) coordinate of the ith pointto- resulting array of projection coordinates, where to[0][i], to[1][i] is the (x,y) coordinate of the ith pointlatIndex- index of latitude in "from"lonIndex- index of longitude in "from"- Returns:
- the "to" array.
-
projToLatLon
public float[][] projToLatLon(float[][] from, float[][] to)Convert lat/lon coordinates to projection coordinates.- Overrides:
projToLatLonin classucar.unidata.geoloc.ProjectionImpl- Parameters:
from- array of lat/lon coordinates: from[2][n], where (from[0][i], from[1][i]) is the (lat,lon) coordinate of the ith pointto- resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point- Returns:
- the "to" array
-
latLonToProj
public double[][] latLonToProj(double[][] from, double[][] to, int latIndex, int lonIndex)Convert lat/lon coordinates to projection coordinates.- Overrides:
latLonToProjin classucar.unidata.geoloc.ProjectionImpl- Parameters:
from- array of lat/lon coordinates: from[2][n], where from[0][i], from[1][i] is the (lat,lon) coordinate of the ith pointto- resulting array of projection coordinates, where to[0][i], to[1][i] is the (x,y) coordinate of the ith pointlatIndex- index of latitude in "from"lonIndex- index of longitude in "from"- Returns:
- the "to" array.
-
projToLatLon
public double[][] projToLatLon(double[][] from, double[][] to)Convert lat/lon coordinates to projection coordinates.- Overrides:
projToLatLonin classucar.unidata.geoloc.ProjectionImpl- Parameters:
from- array of lat/lon coordinates: from[2][n], where (from[0][i], from[1][i]) is the (lat,lon) coordinate of the ith pointto- resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point- Returns:
- the "to" array
-
getDefaultMapArea
public ucar.unidata.geoloc.ProjectionRect getDefaultMapArea()
Get the bounds for this image- Specified by:
getDefaultMapAreain interfaceucar.unidata.geoloc.Projection- Overrides:
getDefaultMapAreain classucar.unidata.geoloc.ProjectionImpl- Returns:
- the projection bounds
-
crossSeam
public boolean crossSeam(ucar.unidata.geoloc.ProjectionPoint pt1, ucar.unidata.geoloc.ProjectionPoint pt2)This returns true when the line between pt1 and pt2 crosses the seam. When the cone is flattened, the "seam" is lon0 +- 180.- Specified by:
crossSeamin interfaceucar.unidata.geoloc.Projection- Specified by:
crossSeamin classucar.unidata.geoloc.ProjectionImpl- Parameters:
pt1- point 1pt2- point 2- Returns:
- true when the line between pt1 and pt2 crosses the seam.
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceucar.unidata.geoloc.Projection- Specified by:
equalsin classucar.unidata.geoloc.ProjectionImpl
-
toString
public String toString()
Return a String which tells some info about this navigation- Overrides:
toStringin classucar.unidata.geoloc.ProjectionImpl- Returns:
- wordy String
-
paramsToString
public String paramsToString()
Get the parameters as a String- Specified by:
paramsToStringin interfaceucar.unidata.geoloc.Projection- Specified by:
paramsToStringin classucar.unidata.geoloc.ProjectionImpl- Returns:
- the parameters as a String
-
-