Package ucar.unidata.geoloc
Class ProjectionImpl
java.lang.Object
ucar.unidata.geoloc.ProjectionImpl
- All Implemented Interfaces:
Serializable,Projection
Deprecated.
only use Projection interface in 6; will not implement Serializable in ver6
Superclass for our implementations of geoloc.Projection.
All subclasses must:
- override equals() and return true when all parameters are equal
- create "atts" list of parameters as string-valued Attribute pairs
- implement abstract methods
Note on "false_easting" and "fale_northing" projection parameters:
- false_easting(northing) = The value added to all x (y) values in the rectangular coordinates for a map projection. This value frequently is assigned to eliminate negative numbers. Expressed in the unit of measure identified in Planar Coordinate Units.
- We dont currently use, assuming that the x and y are just fine as negative numbers.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDeprecated.not public.static final intDeprecated.not public.static final intDeprecated.not public.static final intDeprecated.not public.static final intDeprecated.not public.static final doubleDeprecated.use Math.PIstatic final doubleDeprecated.use Math.PI/2static final doubleDeprecated.use Math.PI/4 -
Method Summary
Modifier and TypeMethodDescriptionabstract ProjectionImplDeprecated.copy constructor - avoid clone !!abstract booleancrossSeam(ProjectionPoint pt1, ProjectionPoint pt2) Deprecated.Does the line between these two points cross the projection "seam".abstract booleanDeprecated.Returns true if this represents the same Projection as proj.ucar.unidata.util.ParameterDeprecated.do not useDeprecated.Get the name of the type of the projection.Deprecated.Get a reasonable bounding box for this projection.Deprecated.Get the bounding box in lat/lon.Deprecated.Get the name of the default units for this projectionstatic StringDeprecated.Get a header for display.getName()Deprecated.Get the name of this specific projection (also see getClassName)List<ucar.unidata.util.Parameter>Deprecated.Get parameters as list of ucar.unidata.util.ParameterDeprecated.Get the label to be used in the gui for this type of projection.booleanisLatLon()Deprecated.Is this the lat/lon Projection ?double[][]latLonToProj(double[][] from) Deprecated.use Projections.latLonToProj(Projection proj, ...)double[][]latLonToProj(double[][] from, double[][] to) Deprecated.use Projections.latLonToProj(Projection proj, ...)double[][]latLonToProj(double[][] from, double[][] to, int latIndex, int lonIndex) Deprecated.use Projections.latLonToProj(Projection proj, ...)double[][]latLonToProj(double[][] from, int latIndex, int lonIndex) Deprecated.use Projections.latLonToProj(Projection proj, ...)float[][]latLonToProj(float[][] from) Deprecated.use Projections.latLonToProj(Projection proj, ...)float[][]latLonToProj(float[][] from, float[][] to) Deprecated.use Projections.latLonToProj(Projection proj, ...)float[][]latLonToProj(float[][] from, float[][] to, int latIndex, int lonIndex) Deprecated.use Projections.latLonToProj(Projection proj, ...)float[][]latLonToProj(float[][] from, int latIndex, int lonIndex) Deprecated.use Projections.latLonToProj(Projection proj, ...)latLonToProj(LatLonPoint latLon) Deprecated.Convert a LatLonPoint to projection coordinates Note: a new object is now created on each call for the return value, as of 4.0.46abstract ProjectionPointlatLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint) Deprecated.use latLonToProj(LatLonPoint latLon)latLonToProjBB(LatLonRect latlonRect) Deprecated.Convert a lat/lon bounding box to a world coordinate bounding box, by finding the minimum enclosing box.abstract StringDeprecated.Get a string representation of the projection parametersdouble[][]projToLatLon(double[][] from) Deprecated.use Projections.latLonToProj(Projection proj, ...)double[][]projToLatLon(double[][] from, double[][] to) Deprecated.use Projections.latLonToProj(Projection proj, ...)float[][]projToLatLon(float[][] from) Deprecated.use Projections.latLonToProj(Projection proj, ...)float[][]projToLatLon(float[][] from, float[][] to) Deprecated.use Projections.latLonToProj(Projection proj, ...)Deprecated.Convert projection coordinates to a LatLonPoint Note: a new object is now created on each call for the return value, as of 4.0.46abstract LatLonPointprojToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint) Deprecated.use projToLatLon(ProjectionPoint ppt)Deprecated.Compute lat/lon bounding box from projection bounding box.projToLatLonBBold(ProjectionRect world) Deprecated.do not usevoidDeprecated.use buildervoidDeprecated.use buildertoString()Deprecated.Get a String representation of this projection.Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ucar.unidata.geoloc.Projection
latLonToProj, projToLatLon
-
Field Details
-
EARTH_RADIUS
public static final double EARTH_RADIUSDeprecated.not public.- See Also:
-
INDEX_LAT
public static final int INDEX_LATDeprecated.not public.- See Also:
-
INDEX_LON
public static final int INDEX_LONDeprecated.not public.- See Also:
-
INDEX_X
public static final int INDEX_XDeprecated.not public.- See Also:
-
INDEX_Y
public static final int INDEX_YDeprecated.not public.- See Also:
-
PI
public static final double PIDeprecated.use Math.PI- See Also:
-
PI_OVER_2
public static final double PI_OVER_2Deprecated.use Math.PI/2- See Also:
-
PI_OVER_4
public static final double PI_OVER_4Deprecated.use Math.PI/4- See Also:
-
-
Method Details
-
constructCopy
Deprecated.copy constructor - avoid clone !!- Returns:
- a copy of this Projection. TODO return Projection in ver6
-
getClassName
Deprecated.Get the name of the type of the projection.- Specified by:
getClassNamein interfaceProjection- Returns:
- the class name
-
paramsToString
Deprecated.Get a string representation of the projection parameters- Specified by:
paramsToStringin interfaceProjection- Returns:
- string representation of the projection parameters
-
getProjectionTypeLabel
Deprecated.Get the label to be used in the gui for this type of projection. This defaults to call getClassName- Returns:
- Type label
-
latLonToProj
@Deprecated public abstract ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint) Deprecated.use latLonToProj(LatLonPoint latLon)Convert a LatLonPoint to projection coordinates- Specified by:
latLonToProjin interfaceProjection- Parameters:
latlon- convert from these lat, lon coordinatesdestPoint- the object to write to- Returns:
- the given destPoint
-
latLonToProj
Deprecated.Convert a LatLonPoint to projection coordinates Note: a new object is now created on each call for the return value, as of 4.0.46- Specified by:
latLonToProjin interfaceProjection- Parameters:
latLon- convert from these lat, lon coordinates- Returns:
- ProjectionPoint convert to these projection coordinates
-
projToLatLon
@Deprecated public abstract LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint) Deprecated.use projToLatLon(ProjectionPoint ppt)Convert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.- Specified by:
projToLatLonin interfaceProjection- Parameters:
ppt- convert from these projection coordinatesdestPoint- the object to write to- Returns:
- LatLonPoint convert to these lat/lon coordinates
-
projToLatLon
Deprecated.Convert projection coordinates to a LatLonPoint Note: a new object is now created on each call for the return value, as of 4.0.46- Specified by:
projToLatLonin interfaceProjection- Parameters:
ppt- convert from these projection coordinates- Returns:
- LatLonPoint convert to these lat/lon coordinates
-
crossSeam
Deprecated.Does the line between these two points cross the projection "seam".- Specified by:
crossSeamin interfaceProjection- Parameters:
pt1- the line goes between these two pointspt2- the line goes between these two points- Returns:
- false if there is no seam
-
equals
Deprecated.Returns true if this represents the same Projection as proj.- Specified by:
equalsin interfaceProjection- Overrides:
equalsin classObject- Parameters:
proj- projection in question- Returns:
- true if this represents the same Projection as proj.
-
getName
Deprecated.Get the name of this specific projection (also see getClassName)- Specified by:
getNamein interfaceProjection- Returns:
- name of the projection
-
setName
Deprecated.use builder -
getDefaultUnits
Deprecated.Get the name of the default units for this projection- Returns:
- the name of the default units
-
getProjectionParameters
Deprecated.Get parameters as list of ucar.unidata.util.Parameter- Specified by:
getProjectionParametersin interfaceProjection- Returns:
- List of parameters
-
findProjectionParameter
Deprecated.do not use -
isLatLon
public boolean isLatLon()Deprecated.Is this the lat/lon Projection ?- Specified by:
isLatLonin interfaceProjection- Returns:
- true if it is the lat/lon Projection
-
getHeader
Deprecated.Get a header for display.- Returns:
- human readable header for display
-
toString
Deprecated.Get a String representation of this projection. -
getDefaultMapArea
Deprecated.Get a reasonable bounding box for this projection.- Specified by:
getDefaultMapAreain interfaceProjection- Returns:
- reasonable bounding box
-
getDefaultMapAreaLL
Deprecated.Get the bounding box in lat/lon.- Returns:
- the LatLonRectangle for the bounding box
-
setDefaultMapArea
Deprecated.use builderSet a reasonable bounding box for this specific projection. Projections are typically specific to an area of the world; theres no bounding box that works for all projections.- Parameters:
bb- bounding box
-
projToLatLon
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert projection coordinates to lat/lon coordinates.- Parameters:
from- array of projection coordinates: from[2][n], where from[0][i], from[1][i] is the x, y coordinate of the ith point- Returns:
- resulting array of lat/lon coordinates, where to[0][i], to[1][i] is the lat,lon coordinate of the ith point
-
projToLatLon
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert projection coordinates to lat/lon coordinate.- Parameters:
from- array of projection coordinates: from[2][n], where (from[0][i], from[1][i]) is the (x, y) coordinate of the ith pointto- resulting array of lat/lon coordinates: to[2][n] where (to[0][i], to[1][i]) is the (lat, lon) coordinate of the ith point- Returns:
- the "to" array
-
projToLatLon
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert projection coordinates to lat/lon coordinates.- Parameters:
from- array of projection coordinates: from[2][n], where from[0][i], from[1][i] is the x, y coordinate of the ith point- Returns:
- resulting array of lat/lon coordinates, where to[0][i], to[1][i] is the lat,lon coordinate of the ith point
-
projToLatLon
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert projection coordinates to lat/lon coordinate.- Parameters:
from- array of projection coordinates: from[2][n], where (from[0][i], from[1][i]) is the (x, y) coordinate of the ith pointto- resulting array of lat/lon coordinates: to[2][n] where (to[0][i], to[1][i]) is the (lat, lon) coordinate of the ith point- Returns:
- the "to" array
-
latLonToProj
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert lat/lon coordinates to projection coordinates.- 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 point- Returns:
- resulting array of projection coordinates, where to[0][i], to[1][i] is the (x,y) coordinate of the ith point
-
latLonToProj
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert lat/lon coordinates to projection coordinates.- 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
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert lat/lon coordinates to projection coordinates.- Parameters:
from- array of lat/lon coordinates: from[2][n], where (from[latIndex][i], from[lonIndex][i]) is the (lat,lon) coordinate of the ith pointlatIndex- index of lat coordinate; must be 0 or 1lonIndex- index of lon coordinate; must be 0 or 1- Returns:
- resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point
-
latLonToProj
@Deprecated public double[][] latLonToProj(double[][] from, double[][] to, int latIndex, int lonIndex) Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert lat/lon coordinates to projection coordinates.- Parameters:
from- array of lat/lon coordinates: from[2][n], where (from[latIndex][i], from[lonIndex][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 pointlatIndex- index of lat coordinate; must be 0 or 1lonIndex- index of lon coordinate; must be 0 or 1- Returns:
- the "to" array
-
latLonToProj
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert lat/lon coordinates to projection coordinates.- 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 point- Returns:
- resulting array of projection coordinates, where to[0][i], to[1][i] is the (x,y) coordinate of the ith point
-
latLonToProj
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert lat/lon coordinates to projection coordinates.- 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
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert lat/lon coordinates to projection coordinates.- Parameters:
from- array of lat/lon coordinates: from[2][n], where (from[latIndex][i], from[lonIndex][i]) is the (lat,lon) coordinate of the ith pointlatIndex- index of lat coordinate; must be 0 or 1lonIndex- index of lon coordinate; must be 0 or 1- Returns:
- resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point
-
latLonToProj
Deprecated.use Projections.latLonToProj(Projection proj, ...)Convert lat/lon coordinates to projection coordinates.- Parameters:
from- array of lat/lon coordinates: from[2][n], where (from[latIndex][i], from[lonIndex][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 pointlatIndex- index of lat coordinate; must be 0 or 1lonIndex- index of lon coordinate; must be 0 or 1- Returns:
- the "to" array
-
latLonToProjBB
Deprecated.Description copied from interface:ProjectionConvert a lat/lon bounding box to a world coordinate bounding box, by finding the minimum enclosing box. Handles lat/lon points that do not intersect the projection panel.- Specified by:
latLonToProjBBin interfaceProjection- Parameters:
latlonRect- input lat,lon bounding box- Returns:
- minimum enclosing box in world coordinates, or null if no part of the LatLonRect intersects the projection plane
-
projToLatLonBB
Deprecated.Description copied from interface:ProjectionCompute lat/lon bounding box from projection bounding box.- Specified by:
projToLatLonBBin interfaceProjection- Parameters:
bb- projection bounding box- Returns:
- lat, lon bounding box.
-
projToLatLonBBold
Deprecated.do not useConvert a world coordinate bounding box to a lat/lon bounding box, by finding the minimum enclosing box.- Parameters:
world- input world coordinate bounding box- Returns:
- minimum enclosing box in lat,lon coordinates.
-