ucar.unidata.geoloc
Interface Projection

All Known Implementing Classes:
AlbersEqualArea, FlatEarth, LambertAzimuthalEqualArea, LambertConformal, LatLonProjection, Mercator, Orthographic, ProjectionAdapter, ProjectionImpl, RotatedLatLon, RotatedPole, Stereographic, TransverseMercator, UtmProjection, VerticalPerspectiveView

public interface Projection

Projective geometry transformations from (lat,lon) to (x,y) on a projective cartesian surface. We use the java.awt.geom 2D classes to represent the coordinates on the projective plane.

Author:
John Caron

Method Summary
 boolean crossSeam(ProjectionPoint pt1, ProjectionPoint pt2)
          Does the line between these two points cross the projection "seam", which is a discontinuity in the function latlon <-> projection plane
 boolean equals(java.lang.Object proj)
          Check for equality with the object in question
 java.lang.String getClassName()
          The name of this class of projections, eg "Transverse Mercator".
 ProjectionRect getDefaultMapArea()
          Get a reasonable bounding box in this projection.
 java.lang.String getName()
          The name of this projection.
 java.util.List<Parameter> getProjectionParameters()
          Get parameters as list of ucar.unidata.util.Parameter
 ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl result)
          Convert a LatLonPoint to projection coordinates.
 java.lang.String paramsToString()
          String representation of the projection parameters.
 LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl result)
          Convert projection coordinates to a LatLonPoint.
 

Method Detail

getClassName

java.lang.String getClassName()
The name of this class of projections, eg "Transverse Mercator".

Returns:
the class name

getName

java.lang.String getName()
The name of this projection.

Returns:
the name of this projection

paramsToString

java.lang.String paramsToString()
String representation of the projection parameters.

Returns:
String representation of the projection parameters.

latLonToProj

ProjectionPoint latLonToProj(LatLonPoint latlon,
                             ProjectionPointImpl result)
Convert a LatLonPoint to projection coordinates. Note: do not assume a new object is created on each call for the return value.

Parameters:
latlon - convert from these lat, lon coordinates
result - point to put result in
Returns:
ProjectionPoint convert to these projection coordinates

projToLatLon

LatLonPoint projToLatLon(ProjectionPoint ppt,
                         LatLonPointImpl result)
Convert projection coordinates to a LatLonPoint. Note: do not assume a new object is created on each call for the return value.

Parameters:
ppt - convert from these projection coordinates
result - return result here, or null
Returns:
lat/lon coordinates

crossSeam

boolean crossSeam(ProjectionPoint pt1,
                  ProjectionPoint pt2)
Does the line between these two points cross the projection "seam", which is a discontinuity in the function latlon <-> projection plane

Parameters:
pt1 - the line goes between these two points
pt2 - the line goes between these two points
Returns:
false if there is no seam, or the line does not cross it.

getDefaultMapArea

ProjectionRect getDefaultMapArea()
Get a reasonable bounding box in this projection. Projections are typically specific to an area of the world; theres no bounding box that works for all projections.

Returns:
a reasonable bounding box in this projection.

equals

boolean equals(java.lang.Object proj)
Check for equality with the object in question

Overrides:
equals in class java.lang.Object
Parameters:
proj - projection to check
Returns:
true if this represents the same Projection as proj.

getProjectionParameters

java.util.List<Parameter> getProjectionParameters()
Get parameters as list of ucar.unidata.util.Parameter

Returns:
List of parameters