Class TransverseMercatorProjection
- java.lang.Object
-
- ucar.unidata.geoloc.ProjectionImpl
-
- ucar.unidata.geoloc.projection.proj4.TransverseMercatorProjection
-
- All Implemented Interfaces:
Serializable
,Projection
public class TransverseMercatorProjection extends ProjectionImpl
Transverse Mercator Projection algorithm is taken from the USGS PROJ package.- See Also:
- Serialized Form
-
-
Field Summary
-
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 TransverseMercatorProjection()
TransverseMercatorProjection(Earth ellipsoid, double lon_0_deg, double lat_0_deg, double k, double falseEast, double falseNorth)
Set up a projection suitable for State Plane Coordinates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjectionImpl
constructCopy()
copy constructor - avoid clone !!boolean
crossSeam(ProjectionPoint pt1, ProjectionPoint pt2)
Does the line between these two points cross the projection "seam".boolean
equals(Object o)
Returns true if this represents the same Projection as proj.String
getProjectionTypeLabel()
Get the label to be used in the gui for this type of projection.int
getRowFromNearestParallel(double latitude)
int
getZoneFromNearestMeridian(double longitude)
int
hashCode()
boolean
hasInverse()
void
initialize()
boolean
isRectilinear()
ProjectionPoint
latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint)
Convert a LatLonPoint to projection coordinatesString
paramsToString()
Get a string representation of the projection parametersProjectionPoint
project(double lplam, double lpphi, ProjectionPointImpl xy)
ProjectionPoint
projectInverse(double x, double y, ProjectionPointImpl out)
LatLonPoint
projToLatLon(ProjectionPoint world, LatLonPointImpl result)
Convert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.void
setUTMZone(int zone)
-
Methods inherited from class ucar.unidata.geoloc.ProjectionImpl
addParameter, addParameter, addParameter, findProjectionParameter, getClassName, getDefaultMapArea, getDefaultMapAreaLL, getDefaultUnits, getHeader, getName, getProjectionParameters, 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
-
-
-
-
Constructor Detail
-
TransverseMercatorProjection
public TransverseMercatorProjection()
-
TransverseMercatorProjection
public TransverseMercatorProjection(Earth ellipsoid, double lon_0_deg, double lat_0_deg, double k, double falseEast, double falseNorth)
Set up a projection suitable for State Plane Coordinates. Best used with earth ellipsoid and false-easting/northing in km
-
-
Method Detail
-
isRectilinear
public boolean isRectilinear()
-
initialize
public void initialize()
-
getRowFromNearestParallel
public int getRowFromNearestParallel(double latitude)
-
getZoneFromNearestMeridian
public int getZoneFromNearestMeridian(double longitude)
-
setUTMZone
public void setUTMZone(int zone)
-
project
public ProjectionPoint project(double lplam, double lpphi, ProjectionPointImpl xy)
-
projectInverse
public ProjectionPoint projectInverse(double x, double y, ProjectionPointImpl out)
-
hasInverse
public boolean hasInverse()
-
getProjectionTypeLabel
public String getProjectionTypeLabel()
Description copied from class:ProjectionImpl
Get the label to be used in the gui for this type of projection. This defaults to call getClassName- Overrides:
getProjectionTypeLabel
in classProjectionImpl
- Returns:
- Type label
-
constructCopy
public ProjectionImpl constructCopy()
Description copied from class:ProjectionImpl
copy constructor - avoid clone !!- Specified by:
constructCopy
in classProjectionImpl
- Returns:
- a copy of this Projection. TODO return Projection in ver6
-
paramsToString
public String paramsToString()
Description copied from class:ProjectionImpl
Get a string representation of the projection parameters- Specified by:
paramsToString
in interfaceProjection
- Specified by:
paramsToString
in classProjectionImpl
- Returns:
- string representation of the projection parameters
-
latLonToProj
public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint)
Description copied from class:ProjectionImpl
Convert a LatLonPoint to projection coordinates- Specified by:
latLonToProj
in interfaceProjection
- Specified by:
latLonToProj
in classProjectionImpl
- Parameters:
latLon
- convert from these lat, lon coordinatesdestPoint
- the object to write to- Returns:
- the given destPoint
-
projToLatLon
public LatLonPoint projToLatLon(ProjectionPoint world, LatLonPointImpl result)
Description copied from class:ProjectionImpl
Convert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.- Specified by:
projToLatLon
in interfaceProjection
- Specified by:
projToLatLon
in classProjectionImpl
- Parameters:
world
- convert from these projection coordinatesresult
- 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:ProjectionImpl
Does the line between these two points cross the projection "seam".- Specified by:
crossSeam
in interfaceProjection
- Specified by:
crossSeam
in 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:ProjectionImpl
Returns true if this represents the same Projection as proj.- Specified by:
equals
in interfaceProjection
- Specified by:
equals
in classProjectionImpl
- Parameters:
o
- projection in question- Returns:
- true if this represents the same Projection as proj.
-
-