|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjview.AbstractFormattingTransform
jview.CylindricalProjection
public class CylindricalProjection
Base class for cylindrical projections of geographic coordinates
longitude λ and latitude φ, both measured in degrees. Longitudes
to the east are positive.
From a central meridian, λ_0 , and a k_0,
you get to NormalizedCoordinates via.
x = confine360(λ-λ_0+180.)/360. y = 0.5-k_0*tan(φ), |φ| < atan(1/2k_0)The name is kept also for non-straight cylindrical projections, that change the y-dependency.
| Field Summary | |
|---|---|
private double |
k0
The k0 factor for phi scaling. |
protected double |
lambda0
The central meridian. |
private boolean |
sexagesimal
If true, we use sexagesimal format. |
static double |
TOPLATITUDE
The default highest latitude to show. |
| Constructor Summary | |
|---|---|
|
CylindricalProjection()
Constructs a new cylindrical Projection for the greenwhich standard. |
|
CylindricalProjection(double l0)
Constructs a new cylindrical Projection for the given standard, scaling such that all up to TOPLATITUDE is visible. |
protected |
CylindricalProjection(double l0,
double k)
Constructs a cylindrical Projection with the given central meridian and a scaling factor for y. |
| Method Summary | |
|---|---|
protected Format |
deduceFormat(double degrees)
Returns a format that is decued from the viewing size. |
Format |
estimateX(double xs)
Estimates the decimal formatter to use on the axis. |
Format |
estimateY(double xs)
Estimates the decimal formatter to use on the axis. |
protected double |
getLambda(Point2D norm)
The standard cylindrical projection uses |
protected double |
getPhi(Point2D norm)
This method is normally overriddn, as cylindric projection is a general term used for other projection with the same x, but different y transformation. |
protected double |
getScale()
Returns the scaling factor. |
protected double |
getX(VectorG lamphi)
The standard cylindrical projection uses |
protected double |
getY(VectorG lamphi)
This method is normally overriddn, as cylindric projection is a general term used for other projection with the same x, but different y transformation. |
void |
setSexagesimal(boolean sex)
Sets the sexagesimal scale in the format. |
Point2D |
toNormalizedDistance(VectorG location,
VectorG delta)
We call the #toNormalized twice and return the difference. |
Point2D |
toNormalizedSpace(VectorG lamphi)
Converts user space corrdinates, which are a longitude/latitude pair in degrees into x/y. |
VectorG |
toUserDistance(Rectangle2D norm)
We call the toUserSpace(java.awt.geom.Point2D) twice and return the difference. |
VectorG |
toUserSpace(Point2D pix)
Converts normalized space into user space. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double TOPLATITUDE
protected double lambda0
private double k0
private boolean sexagesimal
| Constructor Detail |
|---|
public CylindricalProjection()
public CylindricalProjection(double l0)
TOPLATITUDE is visible.
protected CylindricalProjection(double l0,
double k)
| Method Detail |
|---|
protected double getScale()
public Point2D toNormalizedSpace(VectorG lamphi)
lamphi - A vector of user coordinates.
public VectorG toUserSpace(Point2D pix)
pix - A pixel in normalized coordinates.
protected double getX(VectorG lamphi)
x = confine360(λ-λ_0+180.)/360.
protected double getY(VectorG lamphi)
y = 0.5-k_0*tan(φ), |φ| < atan(1/2k_0)
protected double getLambda(Point2D norm)
λ=confine360(360*x+λ_0)-180.
protected double getPhi(Point2D norm)
φ = atan((0.5-y)/k_0)
public Point2D toNormalizedDistance(VectorG location,
VectorG delta)
#toNormalized twice and return the difference.
public VectorG toUserDistance(Rectangle2D norm)
toUserSpace(java.awt.geom.Point2D) twice and return the difference.
public Format estimateX(double xs)
public Format estimateY(double xs)
public void setSexagesimal(boolean sex)
protected Format deduceFormat(double degrees)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||