public class Mercator extends ProjectionImpl
Projection
,
ProjectionImpl
,
Serialized Formatts, defaultMapArea, EARTH_RADIUS, INDEX_LAT, INDEX_LON, INDEX_X, INDEX_Y, isLatLon, name, PI, PI_OVER_2, PI_OVER_4, TOLERANCE
Constructor and Description |
---|
Mercator()
Constructor with default parameters
|
Mercator(double lon0,
double par)
Construct a Mercator Projection.
|
Mercator(double lon0,
double par,
double false_easting,
double false_northing) |
Mercator(double lon0,
double par,
double false_easting,
double false_northing,
double radius)
Construct a Mercator Projection.
|
Modifier and Type | Method and Description |
---|---|
ProjectionImpl |
constructCopy()
copy constructor - avoid clone !!
|
static double |
convertScaleToStandardParallel(double scale)
Convert "scale at standard parellel" to "standard parellel"
|
boolean |
crossSeam(ProjectionPoint pt1,
ProjectionPoint pt2)
Does the line between these two points cross the projection "seam".
|
boolean |
equals(java.lang.Object o)
Returns true if this represents the same Projection as proj.
|
double |
getEarthRadius() |
double |
getFalseEasting()
Get the false easting, in km.
|
double |
getFalseNorthing()
Get the false northing, in km.
|
double |
getOriginLon()
Get the origin longitude.
|
double |
getParallel()
Get the first standard parallel
|
int |
hashCode() |
ProjectionPoint |
latLonToProj(LatLonPoint latLon,
ProjectionPointImpl result)
Convert a LatLonPoint to projection coordinates
|
java.lang.String |
paramsToString()
Get the parameters as a String
|
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 |
setFalseEasting(double falseEasting)
Set the false_easting, in km.
|
void |
setFalseNorthing(double falseNorthing)
Set the false northing, in km.
|
void |
setOriginLon(double lon)
Set the origin longitude.
|
void |
setParallel(double par)
Set the first standard parallel
|
java.lang.String |
toString()
Get a String representation of this projection.
|
addParameter, addParameter, addParameter, findProjectionParameter, getClassName, getDefaultMapArea, getDefaultMapAreaLL, getHeader, getName, getProjectionParameters, getProjectionTypeLabel, isLatLon, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProjBB, projToLatLon, projToLatLon, projToLatLon, projToLatLon, projToLatLon, projToLatLon, projToLatLonBB, projToLatLonBBold, setDefaultMapArea, setName
public Mercator()
public Mercator(double lon0, double par)
lon0
- longitude of origin (degrees)par
- standard parallel (degrees). cylinder cuts earth at this latitude.public Mercator(double lon0, double par, double false_easting, double false_northing)
public Mercator(double lon0, double par, double false_easting, double false_northing, double radius)
lon0
- longitude of origin (degrees)par
- standard parallel (degrees). cylinder cuts earth at this latitude.false_easting
- false_easting in kmfalse_northing
- false_northing in kmradius
- earth radius in kmpublic static double convertScaleToStandardParallel(double scale)
scale
- scale at standard parallelpublic ProjectionImpl constructCopy()
ProjectionImpl
constructCopy
in class ProjectionImpl
public double getParallel()
public double getOriginLon()
public double getFalseEasting()
public double getFalseNorthing()
public double getEarthRadius()
public void setParallel(double par)
par
- the first standard parallelpublic void setOriginLon(double lon)
lon
- the origin longitude.public void setFalseEasting(double falseEasting)
falseEasting
- x offsetpublic void setFalseNorthing(double falseNorthing)
falseNorthing
- y offsetpublic java.lang.String paramsToString()
paramsToString
in interface Projection
paramsToString
in class ProjectionImpl
public java.lang.String toString()
ProjectionImpl
toString
in class ProjectionImpl
public boolean crossSeam(ProjectionPoint pt1, ProjectionPoint pt2)
crossSeam
in interface Projection
crossSeam
in class ProjectionImpl
pt1
- the line goes between these two pointspt2
- the line goes between these two pointspublic boolean equals(java.lang.Object o)
ProjectionImpl
equals
in interface Projection
equals
in class ProjectionImpl
o
- projection in questionpublic int hashCode()
hashCode
in class java.lang.Object
public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl result)
latLonToProj
in interface Projection
latLonToProj
in class ProjectionImpl
latLon
- convert from these lat, lon coordinatesresult
- the object to write topublic LatLonPoint projToLatLon(ProjectionPoint world, LatLonPointImpl result)
projToLatLon
in interface Projection
projToLatLon
in class ProjectionImpl
world
- convert from these projection coordinatesresult
- the object to write to