|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.cs.CRSIdentifiable org.deegree.cs.projections.Projection
public abstract class Projection
Map conversion
is the process of changing the map grid coordinates (usually, but not always, Easting &
Northing) of a Projected Coordinate Reference System to its corresponding geographical coordinates (Latitude &
Longitude) or vice versa.
A projection is conformal if an infinitesimal small perfect circle on the earth's surface results in an infinitesimal small projected perfect circle (an ellipsoid with no eccentricity). In other words, the relative local angles about every point on the map are shown correctly.
An equal area projection can be best explained with a coin (Snyder), a coin (of any size) covers exactly the same area of the actual earth as the same coin on any other part of the map. This can only be done by distorting shape, scale and and angles of the original earth's layout.
Constructor Summary | |
---|---|
Projection(double falseNorthing,
double falseEasting,
javax.vecmath.Point2d naturalOrigin,
IUnit units,
double scale,
boolean conformal,
boolean equalArea,
CRSResource id)
Creates a Projection. |
Method Summary | |
---|---|
abstract javax.vecmath.Point2d |
doInverseProjection(IGeographicCRS underlyingCRS,
double x,
double y)
Do an inverse projection from projected (map) coordinates to geographic coordinates. |
abstract javax.vecmath.Point2d |
doProjection(IGeographicCRS underlyingCRS,
double lambda,
double phi)
The actual transform method doing a projection from geographic coordinates to map coordinates. |
boolean |
equals(Object other)
|
double |
getCosphi0()
|
double |
getEccentricity(IGeographicCRS geographicCRS)
|
IEllipsoid |
getEllipsoid(IGeographicCRS geographicCRS)
|
double |
getFalseEasting()
|
double |
getFalseNorthing()
|
abstract String |
getImplementationName()
|
javax.vecmath.Point2d |
getNaturalOrigin()
|
IPrimeMeridian |
getPrimeMeridian(IGeographicCRS geographicCRS)
|
double |
getProjectionLatitude()
|
double |
getProjectionLongitude()
|
double |
getScale()
|
double |
getScaleFactor(IGeographicCRS geographicCRS)
|
double |
getSemiMajorAxis(IGeographicCRS geographicCRS)
|
double |
getSemiMinorAxis(IGeographicCRS geographicCRS)
|
double |
getSinphi0()
|
double |
getSquaredEccentricity(IGeographicCRS geographicCRS)
|
IUnit |
getUnits()
|
int |
hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. |
boolean |
isConformal()
|
boolean |
isEqualArea()
|
boolean |
isSpherical(IGeographicCRS geographicCRS)
|
void |
setFalseEasting(double newFalseEasting)
sets the false easting to given value. |
void |
setScale(double scale)
Sets the old scale to the given scale, also adjusts the scaleFactor. |
String |
toString()
|
Methods inherited from class org.deegree.cs.CRSIdentifiable |
---|
addAreaOfUse, addName, checkForNullObject, checkForNullObject, checkForNullObject, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getId, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.deegree.cs.CRSResource |
---|
addAreaOfUse, addName, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion |
Methods inherited from interface org.deegree.commons.tom.Object |
---|
getId |
Constructor Detail |
---|
public Projection(double falseNorthing, double falseEasting, javax.vecmath.Point2d naturalOrigin, IUnit units, double scale, boolean conformal, boolean equalArea, CRSResource id)
geographicCRS
- which this projection uses.falseNorthing
- in given unitsfalseEasting
- in given unitsnaturalOrigin
- in radians longitude, latitude.units
- of the map projectionscale
- at the prime meridian (e.g. 0.9996 for UTM)conformal
- if the projection is conformalequalArea
- if the projection result in an equal area mapid
- an identifiable instance containing information about this projection.Method Detail |
---|
public abstract javax.vecmath.Point2d doProjection(IGeographicCRS underlyingCRS, double lambda, double phi) throws ProjectionException
doProjection
in interface IProjection
lambda
- the longitudephi
- the latitude
ProjectionException
- if the given lamba and phi coordinates could not be projected to x and y.public abstract javax.vecmath.Point2d doInverseProjection(IGeographicCRS underlyingCRS, double x, double y) throws ProjectionException
doInverseProjection
in interface IProjection
x
- coordinate on the mapy
- coordinate on the map
ProjectionException
- if the given x and y coordinates could not be inverted to lambda and phi.public abstract String getImplementationName()
getImplementationName
in interface IProjection
public final boolean isConformal()
isConformal
in interface IProjection
public final boolean isEqualArea()
isEqualArea
in interface IProjection
public final double getScale()
getScale
in interface IProjection
public void setScale(double scale)
setScale
in interface IProjection
scale
- the new scalepublic final double getFalseEasting()
getFalseEasting
in interface IProjection
public void setFalseEasting(double newFalseEasting)
setFalseEasting
in interface IProjection
newFalseEasting
- the new false easting parameter.public final double getFalseNorthing()
getFalseNorthing
in interface IProjection
public final javax.vecmath.Point2d getNaturalOrigin()
getNaturalOrigin
in interface IProjection
public final IUnit getUnits()
getUnits
in interface IProjection
public IPrimeMeridian getPrimeMeridian(IGeographicCRS geographicCRS)
getPrimeMeridian
in interface IProjection
public IEllipsoid getEllipsoid(IGeographicCRS geographicCRS)
getEllipsoid
in interface IProjection
public final double getEccentricity(IGeographicCRS geographicCRS)
getEccentricity
in interface IProjection
public final double getSquaredEccentricity(IGeographicCRS geographicCRS)
getSquaredEccentricity
in interface IProjection
public final double getSemiMajorAxis(IGeographicCRS geographicCRS)
getSemiMajorAxis
in interface IProjection
public final double getSemiMinorAxis(IGeographicCRS geographicCRS)
getSemiMinorAxis
in interface IProjection
public final double getProjectionLatitude()
getProjectionLatitude
in interface IProjection
public final double getProjectionLongitude()
getProjectionLongitude
in interface IProjection
public final double getSinphi0()
getSinphi0
in interface IProjection
public final double getCosphi0()
getCosphi0
in interface IProjection
public double getScaleFactor(IGeographicCRS geographicCRS)
getScaleFactor
in interface IProjection
public boolean isSpherical(IGeographicCRS geographicCRS)
isSpherical
in interface IProjection
public boolean equals(Object other)
equals
in class CRSIdentifiable
public String toString()
toString
in class CRSIdentifiable
public int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode
in class CRSIdentifiable
Object.hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |