Package org.locationtech.proj4j.proj
Class TransverseMercatorProjection
- java.lang.Object
-
- org.locationtech.proj4j.proj.Projection
-
- org.locationtech.proj4j.proj.CylindricalProjection
-
- org.locationtech.proj4j.proj.TransverseMercatorProjection
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class TransverseMercatorProjection extends CylindricalProjection
Transverse Mercator Projection algorithm is taken from the USGS PROJ package.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private double[]
en
private double
esp
private static double
FC1
private static double
FC2
private static double
FC3
private static double
FC4
private static double
FC5
private static double
FC6
private static double
FC7
private static double
FC8
protected boolean
isSouth
Indicates whether a Southern Hemisphere UTM zoneprivate double
ml0
private int
utmZone
-
Fields inherited from class org.locationtech.proj4j.proj.Projection
a, alpha, DTR, e, ellipsoid, EPS10, es, falseEasting, falseNorthing, fromMetres, geocentric, lonc, maxLatitude, maxLongitude, minLatitude, minLongitude, name, one_es, projectionLatitude, projectionLatitude1, projectionLatitude2, projectionLongitude, rone_es, RTD, scaleFactor, spherical, totalScale, trueScaleLatitude, unit
-
-
Constructor Summary
Constructors Constructor Description TransverseMercatorProjection()
TransverseMercatorProjection(Ellipsoid ellipsoid, double lon_0, double lat_0, double k, double x_0, double y_0)
Set up a projection suitable for State Plane Coordinates.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
static int
getRowFromNearestParallel(double latitude)
boolean
getSouthernHemisphere()
static int
getZoneFromNearestMeridian(double longitude)
boolean
hasInverse()
Tests whether this projection has an inverse.void
initialize()
Initialize the projection.boolean
isRectilinear()
Tests whether under this projection lines of latitude and longitude form a rectangular gridProjCoordinate
project(double lplam, double lpphi, ProjCoordinate xy)
Computes the projection of a given point (i.e.ProjCoordinate
projectInverse(double x, double y, ProjCoordinate out)
Computes the inverse projection of a given point (i.e.void
setSouthernHemisphere(boolean isSouth)
void
setUTMZone(int zone)
java.lang.String
toString()
-
Methods inherited from class org.locationtech.proj4j.proj.Projection
equals, getAlpha, getAxisOrder, getEllipsoid, getEPSGCode, getEquatorRadius, getFalseEasting, getFalseNorthing, getFromMetres, getHeightOfOrbit, getLonC, getMaxLatitude, getMaxLatitudeDegrees, getMaxLongitude, getMaxLongitudeDegrees, getMinLatitude, getMinLatitudeDegrees, getMinLongitude, getMinLongitudeDegrees, getName, getPrimeMeridian, getPROJ4Description, getProjectionLatitude, getProjectionLatitude1, getProjectionLatitude1Degrees, getProjectionLatitude2, getProjectionLatitude2Degrees, getProjectionLatitudeDegrees, getProjectionLongitude, getProjectionLongitudeDegrees, getScaleFactor, getTrueScaleLatitude, getTrueScaleLatitudeDegrees, getUnits, hashCode, inside, inverseProject, inverseProjectRadians, isConformal, isEqualArea, isGeographic, normalizeLongitude, normalizeLongitudeRadians, parallelsAreParallel, project, projectRadians, setAlpha, setAlphaDegrees, setAxisOrder, setEllipsoid, setFalseEasting, setFalseNorthing, setFromMetres, setGamma, setGammaDegrees, setHeightOfOrbit, setLonC, setLonCDegrees, setMaxLatitude, setMaxLongitude, setMaxLongitudeDegrees, setMinLatitude, setMinLongitude, setMinLongitudeDegrees, setName, setNoUoff, setPrimeMeridian, setProjectionLatitude, setProjectionLatitude1, setProjectionLatitude1Degrees, setProjectionLatitude2, setProjectionLatitude2Degrees, setProjectionLatitudeDegrees, setProjectionLongitude, setProjectionLongitudeDegrees, setRadius, setScaleFactor, setTrueScaleLatitude, setTrueScaleLatitudeDegrees, setUnits
-
-
-
-
Field Detail
-
FC1
private static final double FC1
- See Also:
- Constant Field Values
-
FC2
private static final double FC2
- See Also:
- Constant Field Values
-
FC3
private static final double FC3
- See Also:
- Constant Field Values
-
FC4
private static final double FC4
- See Also:
- Constant Field Values
-
FC5
private static final double FC5
- See Also:
- Constant Field Values
-
FC6
private static final double FC6
- See Also:
- Constant Field Values
-
FC7
private static final double FC7
- See Also:
- Constant Field Values
-
FC8
private static final double FC8
- See Also:
- Constant Field Values
-
isSouth
protected boolean isSouth
Indicates whether a Southern Hemisphere UTM zone
-
utmZone
private int utmZone
-
esp
private double esp
-
ml0
private double ml0
-
en
private double[] en
-
-
Constructor Detail
-
TransverseMercatorProjection
public TransverseMercatorProjection()
-
TransverseMercatorProjection
public TransverseMercatorProjection(Ellipsoid ellipsoid, double lon_0, double lat_0, double k, double x_0, double y_0)
Set up a projection suitable for State Plane Coordinates.
-
-
Method Detail
-
setSouthernHemisphere
public void setSouthernHemisphere(boolean isSouth)
- Overrides:
setSouthernHemisphere
in classProjection
-
getSouthernHemisphere
public boolean getSouthernHemisphere()
- Overrides:
getSouthernHemisphere
in classProjection
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classProjection
-
isRectilinear
public boolean isRectilinear()
Description copied from class:Projection
Tests whether under this projection lines of latitude and longitude form a rectangular grid- Overrides:
isRectilinear
in classCylindricalProjection
-
initialize
public void initialize()
Description copied from class:Projection
Initialize the projection. This should be called after setting parameters and before using the projection. This is for performance reasons as initialization may be expensive.- Overrides:
initialize
in classProjection
-
getRowFromNearestParallel
public static int getRowFromNearestParallel(double latitude)
-
getZoneFromNearestMeridian
public static int getZoneFromNearestMeridian(double longitude)
-
setUTMZone
public void setUTMZone(int zone)
-
project
public ProjCoordinate project(double lplam, double lpphi, ProjCoordinate xy)
Description copied from class:Projection
Computes the projection of a given point (i.e. from geographics to projection space). This should be overridden for all projections.- Overrides:
project
in classProjection
- Parameters:
lplam
- the geographic x ordinate (in radians)lpphi
- the geographic y ordinatee (in radians)xy
- the projected coordinate (in coordinate system units)- Returns:
- the target coordinate
-
projectInverse
public ProjCoordinate projectInverse(double x, double y, ProjCoordinate out)
Description copied from class:Projection
Computes the inverse projection of a given point (i.e. from projection space to geographics). This should be overridden for all projections.- Overrides:
projectInverse
in classProjection
- Parameters:
x
- the projected x ordinate (in coordinate system units)y
- the projected y ordinate (in coordinate system units)out
- the inverse-projected geographic coordinate (in radians)- Returns:
- the target coordinate
-
hasInverse
public boolean hasInverse()
Description copied from class:Projection
Tests whether this projection has an inverse. If this method returns true then theProjection.inverseProject(ProjCoordinate, ProjCoordinate)
andProjection.inverseProjectRadians(ProjCoordinate, ProjCoordinate)
methods will return meaningful results.- Overrides:
hasInverse
in classProjection
- Returns:
- true if this projection has an inverse
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCylindricalProjection
-
-