public abstract class AbstractProjection extends java.lang.Object implements Projection
| Modifier and Type | Field and Description |
|---|---|
protected Datum |
datum |
protected Ellipsoid |
ellps |
protected double |
k0 |
protected double |
lon0 |
protected double |
pm |
protected Proj |
proj |
private ProjectionBounds |
projectionBoundsBox |
protected double |
toMeter |
protected double |
x0 |
protected double |
y0 |
| Constructor and Description |
|---|
AbstractProjection() |
| Modifier and Type | Method and Description |
|---|---|
protected static double |
convertDegreeMinuteSecond(double degree,
double minute,
double second) |
protected static double |
convertMinuteSecond(double minute,
double second) |
LatLon |
eastNorth2latlon(EastNorth en)
Convert from easting/norting to lat/lon.
|
private LatLon |
eastNorth2latlon(EastNorth en,
java.util.function.DoubleUnaryOperator normalizeLon) |
LatLon |
eastNorth2latlonClamped(EastNorth en)
Convert a east/north coordinate to the
LatLon coordinate. |
Projection |
getBaseProjection()
Gets the base projection instance used.
|
double |
getCentralMeridian()
Gets the meridian that this projection is centered on.
|
Datum |
getDatum()
Gets the datum this projection is based on.
|
double |
getDefaultZoomInPPD()
The default scale factor in east/north units per pixel
(
NavigatableComponent.getState())). |
Ellipsoid |
getEllipsoid()
Get the base ellipsoid that this projection uses.
|
abstract java.lang.Integer |
getEpsgCode() |
double |
getFalseEasting()
Gets an east offset that gets applied when converting the coordinate
|
double |
getFalseNorthing()
Gets an north offset that gets applied when converting the coordinate
|
Proj |
getProj()
Replies the projection (in the narrow sense)
|
java.util.Map<ProjectionBounds,Projecting> |
getProjectingsForArea(ProjectionBounds area)
Returns an map or (subarea, projecting) paris that contains projecting instances to convert the coordinates inside the given area.
|
double |
getScaleFactor() |
double |
getToMeter()
Get the factor that converts meters to intended units of east/north coordinates.
|
ProjectionBounds |
getWorldBoundsBoxEastNorth()
Get an approximate EastNorth box around the lat/lon world bounds.
|
EastNorth |
latlon2eastNorth(ILatLon toConvert)
Convert from lat/lon to easting/northing.
|
java.lang.String |
toCode()
Default implementation of toCode().
|
void |
visitOutline(Bounds b,
java.util.function.Consumer<EastNorth> visitor)
Visit points along the edge of this bounds instance.
|
private void |
visitOutline(Bounds b,
int nPoints,
java.util.function.Consumer<EastNorth> visitor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEastNorthBoundsBox, getLatLonBoundsBox, getMetersPerUnit, getWorldBoundsLatLon, switchXY, toStringgetCacheKey, latlon2eastNorthprotected double x0
protected double y0
protected double lon0
protected double pm
protected double k0
protected double toMeter
private volatile ProjectionBounds projectionBoundsBox
public AbstractProjection()
public final Ellipsoid getEllipsoid()
Ellipsoidpublic final Datum getDatum()
public final Proj getProj()
public final double getFalseEasting()
public final double getFalseNorthing()
public final double getCentralMeridian()
public final double getScaleFactor()
public final double getToMeter()
public EastNorth latlon2eastNorth(ILatLon toConvert)
ProjectingILatLon interface.latlon2eastNorth in interface ProjectingtoConvert - the geographical point to convert (in WGS84 lat/lon)as shorthand.public LatLon eastNorth2latlon(EastNorth en)
ProjectioneastNorth2latlon in interface Projectionen - the geographical point to convert (in projected coordinates)public LatLon eastNorth2latlonClamped(EastNorth en)
ProjectingLatLon coordinate.
This method clamps the lat/lon coordinate to the nearest point in the world bounds.eastNorth2latlonClamped in interface Projectingen - east/northprivate LatLon eastNorth2latlon(EastNorth en, java.util.function.DoubleUnaryOperator normalizeLon)
public java.util.Map<ProjectionBounds,Projecting> getProjectingsForArea(ProjectionBounds area)
ProjectinggetProjectingsForArea in interface Projectingarea - The base areaProjectionBounds instances mapped to the Projecting object to use for that area.public double getDefaultZoomInPPD()
ProjectionNavigatableComponent.getState())).
FIXME: misnomergetDefaultZoomInPPD in interface Projectionpublic abstract java.lang.Integer getEpsgCode()
public java.lang.String toCode()
toCode in interface Projectionprotected static final double convertMinuteSecond(double minute, double second)
protected static final double convertDegreeMinuteSecond(double degree, double minute, double second)
public final ProjectionBounds getWorldBoundsBoxEastNorth()
ProjectionProjection.getWorldBoundsLatLon(). The lat/lon bounds need not be a
rectangular shape in east/north space. This method returns a box that
contains this shape.getWorldBoundsBoxEastNorth in interface Projectionpublic Projection getBaseProjection()
ProjectinggetBaseProjection in interface Projectingpublic void visitOutline(Bounds b, java.util.function.Consumer<EastNorth> visitor)
ProjectionDepending on the shape in east/north space, it may simply visit the 4 corners or (more generally) several points along the curved edges.
visitOutline in interface Projectionb - the lat/lon rectangle to tracevisitor - a function to call for the points on the edge.private void visitOutline(Bounds b, int nPoints, java.util.function.Consumer<EastNorth> visitor)