Package ucar.unidata.geoloc.projection
Class RotatedLatLon
- java.lang.Object
-
- ucar.unidata.geoloc.ProjectionImpl
-
- ucar.unidata.geoloc.projection.RotatedLatLon
-
- All Implemented Interfaces:
Serializable,Projection
public class RotatedLatLon extends ProjectionImpl
Grib 1 projection 10 and Grib 2 projection 1. The Rotated Latitude Longitude projection algorithms that are coded here were given by Tor Christian Bekkvik. The rotated lat/lon projection coordinates are defined in the grid file that need to be converted back to unrotated lat/lon projection coordinates before they can be displayed. The X/Y axis only makes sense in the rotated projection. - Since:
- Nov 11, 2008
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringGRID_MAPPING_NAMEstatic StringGRID_SOUTH_POLE_ANGLEstatic StringGRID_SOUTH_POLE_LATITUDEstatic StringGRID_SOUTH_POLE_LONGITUDE-
Fields inherited from class ucar.unidata.geoloc.ProjectionImpl
atts, defaultMapArea, defaultUnits, EARTH_RADIUS, INDEX_LAT, INDEX_LON, INDEX_X, INDEX_Y, isLatLon, name, PI, PI_OVER_2, PI_OVER_4, TOLERANCE
-
-
Constructor Summary
Constructors Constructor Description RotatedLatLon()Default Constructor, needed for beans.RotatedLatLon(double southPoleLat, double southPoleLon, double southPoleAngle)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjectionImplconstructCopy()copy constructor - avoid clone !!booleancrossSeam(ProjectionPoint pt1, ProjectionPoint pt2)Does the line between these two points cross the projection "seam".booleanequals(Object o)Returns true if this represents the same Projection as proj.doublegetLonpole()doublegetPolerotate()doublegetSinDlat()inthashCode()ProjectionPointlatLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint)Transform a "real" longitude and latitude into the rotated longitude (X) and rotated latitude (Y).StringparamsToString()returns constructor params as a StringLatLonPointprojToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint)Transform a rotated longitude (X) and rotated latitude (Y) into a "real" longitude-latitude pair.-
Methods inherited from class ucar.unidata.geoloc.ProjectionImpl
addParameter, addParameter, addParameter, findProjectionParameter, getClassName, getDefaultMapArea, getDefaultMapAreaLL, getDefaultUnits, getHeader, getName, getProjectionParameters, getProjectionTypeLabel, isLatLon, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProjBB, projToLatLon, projToLatLon, projToLatLon, projToLatLon, projToLatLon, projToLatLonBB, projToLatLonBBold, setDefaultMapArea, setName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ucar.unidata.geoloc.Projection
latLonToProj, projToLatLon
-
-
-
-
Field Detail
-
GRID_MAPPING_NAME
public static final String GRID_MAPPING_NAME
- See Also:
- Constant Field Values
-
GRID_SOUTH_POLE_LONGITUDE
public static final String GRID_SOUTH_POLE_LONGITUDE
- See Also:
- Constant Field Values
-
GRID_SOUTH_POLE_LATITUDE
public static final String GRID_SOUTH_POLE_LATITUDE
- See Also:
- Constant Field Values
-
GRID_SOUTH_POLE_ANGLE
public static final String GRID_SOUTH_POLE_ANGLE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RotatedLatLon
public RotatedLatLon()
Default Constructor, needed for beans.
-
RotatedLatLon
public RotatedLatLon(double southPoleLat, double southPoleLon, double southPoleAngle)Constructor.- Parameters:
southPoleLat- in degreessouthPoleLon- in degreessouthPoleAngle- in degrees
-
-
Method Detail
-
getLonpole
public double getLonpole()
-
getPolerotate
public double getPolerotate()
-
getSinDlat
public double getSinDlat()
-
constructCopy
public ProjectionImpl constructCopy()
Description copied from class:ProjectionImplcopy constructor - avoid clone !!- Specified by:
constructCopyin classProjectionImpl- Returns:
- a copy of this Projection. TODO return Projection in ver6
-
paramsToString
public String paramsToString()
returns constructor params as a String- Specified by:
paramsToStringin interfaceProjection- Specified by:
paramsToStringin classProjectionImpl- Returns:
- String
-
latLonToProj
public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint)
Transform a "real" longitude and latitude into the rotated longitude (X) and rotated latitude (Y).- Specified by:
latLonToProjin interfaceProjection- Specified by:
latLonToProjin classProjectionImpl- Parameters:
latlon- convert from these lat, lon coordinatesdestPoint- the object to write to- Returns:
- the given destPoint
-
projToLatLon
public LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint)
Transform a rotated longitude (X) and rotated latitude (Y) into a "real" longitude-latitude pair.- Specified by:
projToLatLonin interfaceProjection- Specified by:
projToLatLonin classProjectionImpl- Parameters:
ppt- convert from these projection coordinatesdestPoint- the object to write to- Returns:
- LatLonPoint convert to these lat/lon coordinates
-
crossSeam
public boolean crossSeam(ProjectionPoint pt1, ProjectionPoint pt2)
Description copied from class:ProjectionImplDoes the line between these two points cross the projection "seam".- Specified by:
crossSeamin interfaceProjection- Specified by:
crossSeamin classProjectionImpl- Parameters:
pt1- the line goes between these two pointspt2- the line goes between these two points- Returns:
- false if there is no seam
-
equals
public boolean equals(Object o)
Description copied from class:ProjectionImplReturns true if this represents the same Projection as proj.- Specified by:
equalsin interfaceProjection- Specified by:
equalsin classProjectionImpl- Parameters:
o- projection in question- Returns:
- true if this represents the same Projection as proj.
-
-