public abstract class ProjectionImpl extends Object implements Projection, Serializable
All subclasses must:
Note on "false_easting" and "fale_northing" projection parameters:
Projection
,
Serialized FormModifier and Type | Field and Description |
---|---|
static double |
EARTH_RADIUS
Deprecated.
Earth radius in kilometers
|
static int |
INDEX_LAT
Deprecated.
Latitude index
|
static int |
INDEX_LON
Deprecated.
Longitude index
|
static int |
INDEX_X
Deprecated.
X index
|
static int |
INDEX_Y
Deprecated.
Y index
|
static double |
PI
Deprecated.
PI
|
static double |
PI_OVER_2
Deprecated.
PI/2
|
static double |
PI_OVER_4
Deprecated.
PI/4
|
Modifier and Type | Method and Description |
---|---|
abstract ProjectionImpl |
constructCopy()
Deprecated.
copy constructor - avoid clone !!
|
abstract boolean |
crossSeam(ProjectionPoint pt1,
ProjectionPoint pt2)
Deprecated.
Does the line between these two points cross the projection "seam".
|
abstract boolean |
equals(Object proj)
Deprecated.
Returns true if this represents the same Projection as proj.
|
Parameter |
findProjectionParameter(String want)
Deprecated.
|
String |
getClassName()
Deprecated.
Get the name of the type of the projection.
|
ProjectionRect |
getDefaultMapArea()
Deprecated.
Get a reasonable bounding box for this projection.
|
LatLonRect |
getDefaultMapAreaLL()
Deprecated.
Get the bounding box in lat/lon.
|
static String |
getHeader()
Deprecated.
Get a header for display.
|
String |
getName()
Deprecated.
Get the name of this specific projection (also see getClassName)
|
List<Parameter> |
getProjectionParameters()
Deprecated.
Get parameters as list of ucar.unidata.util.Parameter
|
String |
getProjectionTypeLabel()
Deprecated.
Get the label to be used in the gui for this type of projection.
|
boolean |
isLatLon()
Deprecated.
Is this the lat/lon Projection ?
|
double[][] |
latLonToProj(double[][] from)
Deprecated.
Convert lat/lon coordinates to projection coordinates.
|
double[][] |
latLonToProj(double[][] from,
double[][] to)
Deprecated.
Convert lat/lon coordinates to projection coordinates.
|
double[][] |
latLonToProj(double[][] from,
double[][] to,
int latIndex,
int lonIndex)
Deprecated.
Convert lat/lon coordinates to projection coordinates.
|
double[][] |
latLonToProj(double[][] from,
int latIndex,
int lonIndex)
Deprecated.
Convert lat/lon coordinates to projection coordinates.
|
ProjectionPoint |
latLonToProj(double lat,
double lon)
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
|
float[][] |
latLonToProj(float[][] from)
Deprecated.
Convert lat/lon coordinates to projection coordinates.
|
float[][] |
latLonToProj(float[][] from,
float[][] to)
Deprecated.
Convert lat/lon coordinates to projection coordinates.
|
float[][] |
latLonToProj(float[][] from,
float[][] to,
int latIndex,
int lonIndex)
Deprecated.
Convert lat/lon coordinates to projection coordinates.
|
float[][] |
latLonToProj(float[][] from,
int latIndex,
int lonIndex)
Deprecated.
Convert lat/lon coordinates to projection coordinates.
|
ProjectionPoint |
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.46
|
abstract ProjectionPoint |
latLonToProj(LatLonPoint latlon,
ProjectionPointImpl destPoint)
Deprecated.
Convert a LatLonPoint to projection coordinates
|
ProjectionRect |
latLonToProjBB(LatLonRect latlonRect)
Deprecated.
Convert a lat/lon bounding box to a world coordinate bounding box,
by finding the minimum enclosing box.
|
abstract String |
paramsToString()
Deprecated.
Get a string representation of the projection parameters
|
double[][] |
projToLatLon(double[][] from)
Deprecated.
Convert projection coordinates to lat/lon coordinates.
|
double[][] |
projToLatLon(double[][] from,
double[][] to)
Deprecated.
Convert projection coordinates to lat/lon coordinate.
|
LatLonPoint |
projToLatLon(double x,
double y)
Deprecated.
Convert a projection coordinate to a LatLonPoint
Note: a new object is now created on each call for the return value, as of 4.0.46
|
float[][] |
projToLatLon(float[][] from)
Deprecated.
Convert projection coordinates to lat/lon coordinates.
|
float[][] |
projToLatLon(float[][] from,
float[][] to)
Deprecated.
Convert projection coordinates to lat/lon coordinate.
|
LatLonPoint |
projToLatLon(ProjectionPoint ppt)
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
|
abstract LatLonPoint |
projToLatLon(ProjectionPoint ppt,
LatLonPointImpl destPoint)
Deprecated.
Convert projection coordinates to a LatLonPoint
Note: a new object is not created on each call for the return value.
|
LatLonRect |
projToLatLonBB(ProjectionRect bb)
Deprecated.
Compute lat/lon bounding box from projection bounding box by finding the minimum enclosing box.
|
LatLonRect |
projToLatLonBBold(ProjectionRect world)
Deprecated.
Convert a world coordinate bounding box to a lat/lon bounding box,
by finding the minimum enclosing box.
|
void |
setDefaultMapArea(ProjectionRect bb)
Deprecated.
Set a reasonable bounding box for this specific projection.
|
void |
setName(String name)
Deprecated.
|
String |
toString()
Deprecated.
Get a String representation of this projection.
|
public static final double EARTH_RADIUS
public static final int INDEX_LAT
public static final int INDEX_LON
public static final int INDEX_X
public static final int INDEX_Y
public static final double PI
public static final double PI_OVER_2
public static final double PI_OVER_4
public abstract ProjectionImpl constructCopy()
public String getClassName()
getClassName
in interface Projection
public abstract String paramsToString()
paramsToString
in interface Projection
public String getProjectionTypeLabel()
public abstract ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint)
latLonToProj
in interface Projection
latlon
- convert from these lat, lon coordinatesdestPoint
- the object to write topublic abstract LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint)
projToLatLon
in interface Projection
ppt
- convert from these projection coordinatesdestPoint
- the object to write topublic ProjectionPoint latLonToProj(LatLonPoint latLon)
latLon
- convert from these lat, lon coordinatespublic LatLonPoint projToLatLon(ProjectionPoint ppt)
ppt
- convert from these projection coordinatespublic abstract boolean crossSeam(ProjectionPoint pt1, ProjectionPoint pt2)
crossSeam
in interface Projection
pt1
- the line goes between these two pointspt2
- the line goes between these two pointspublic abstract boolean equals(Object proj)
equals
in interface Projection
equals
in class Object
proj
- projection in questionpublic String getName()
getName
in interface Projection
public void setName(String name)
public List<Parameter> getProjectionParameters()
getProjectionParameters
in interface Projection
public boolean isLatLon()
public static String getHeader()
public String toString()
public ProjectionRect getDefaultMapArea()
getDefaultMapArea
in interface Projection
public LatLonRect getDefaultMapAreaLL()
public void setDefaultMapArea(ProjectionRect bb)
bb
- bounding boxpublic ProjectionPoint latLonToProj(double lat, double lon)
lat
- latitude of point to convertlon
- longitude of point to convertpublic LatLonPoint projToLatLon(double x, double y)
x
- x value to converty
- y value to convertpublic double[][] projToLatLon(double[][] from)
from
- array of projection coordinates: from[2][n],
where from[0][i], from[1][i] is the x, y coordinate
of the ith pointpublic double[][] projToLatLon(double[][] from, double[][] to)
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 pointpublic float[][] projToLatLon(float[][] from)
from
- array of projection coordinates: from[2][n],
where from[0][i], from[1][i] is the x, y coordinate
of the ith pointpublic float[][] projToLatLon(float[][] from, float[][] to)
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 pointpublic double[][] latLonToProj(double[][] from)
from
- array of lat/lon coordinates: from[2][n],
where from[0][i], from[1][i] is the (lat,lon)
coordinate of the ith pointpublic double[][] latLonToProj(double[][] from, double[][] to)
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 pointpublic double[][] latLonToProj(double[][] from, int latIndex, int lonIndex)
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 1public double[][] latLonToProj(double[][] from, double[][] to, int latIndex, int lonIndex)
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 1public float[][] latLonToProj(float[][] from)
from
- array of lat/lon coordinates: from[2][n],
where from[0][i], from[1][i] is the (lat,lon)
coordinate of the ith pointpublic float[][] latLonToProj(float[][] from, float[][] to)
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 pointpublic float[][] latLonToProj(float[][] from, int latIndex, int lonIndex)
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 1public float[][] latLonToProj(float[][] from, float[][] to, int latIndex, int lonIndex)
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 1public ProjectionRect latLonToProjBB(LatLonRect latlonRect)
latLonToProjBB
in interface Projection
latlonRect
- input lat,lon bounding boxpublic LatLonRect projToLatLonBBold(ProjectionRect world)
world
- input world coordinate bounding boxpublic LatLonRect projToLatLonBB(ProjectionRect bb)
bb
- projection bounding box