|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
jview.JImageComponent
jview.JEarth
public class JEarth
This class displays a mercator projection of the earth. Materials are from Weisstein, Eric W. Mercator Projection From MathWorld--A Wolfram Web Resource.
The formulars governing a mercator projection are
x = λ-λ_0,
y = ln(tan(φ)+1/cos(φ)) = 1/2ln((1+sin(φ))/(1-sin(φ))),
Thus with inversions
λ = x + λ_0
tan(φ) = sinh(y)
This class provides methods for converting geographical coordinates in x-y of
a mercator projection, but does not display anything except the earth. The
image of the earth is loaded on init.
| Nested Class Summary | |
|---|---|
static class |
JEarth.Show
Shows the earth in a mercator projection. |
| Nested classes/interfaces inherited from class jview.JImageComponent |
|---|
JImageComponent.Display |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private static double |
DEFLAMBDA0
The lambda-zero meridian. |
private static String |
DEFMERCATOR
The location of the mercator map. |
private static String |
DEFURLRESOURCES
The url-resources. |
private static double |
DEFXORIGIN
The default origin in x. |
private static double |
DEFXSCALE
The default scale factor in x. |
private static double |
DEFYORIGIN
The default origin in y. |
private static double |
DEFYSCALE
The default scale factor in x. |
private ResourceSupplying |
info
My properties. |
static String |
KEY_LAMBDA0
The center of projection, only longitude needed. |
static String |
KEY_MERCATOR
The key to the location of the mercator map as an image. |
static String |
KEY_XORIGIN
The x-position of the zero point in geographical coordinates. |
static String |
KEY_XSCALE
The scale factor in x if coordinates are given in degrees. |
static String |
KEY_YORIGIN
The y-position of the zero point in geographical coordinates. |
static String |
KEY_YSCALE
The scale factor in y if coordinates are given in degrees. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JEarth(ResourceSupplying info)
Constructs a new JMosaic with at least one of the row and column numbers specified. |
|
| Method Summary | |
|---|---|
ResourceSupplying |
getComposedProperties()
Returns my properties. |
Point2D |
getGeography(Point pix)
Inverses the getPixel(double, double) method using the input coordinates on the
image. |
Point |
getPixel(double lambda,
double phi)
Calculates the position on the mercator image of a geographical position on earth. |
void |
init()
Loads the image on init. |
void |
setComposedProperties(ResourceSupplying prop)
Sets the proberties of the mosaic and defines its layout as grid layout. |
| Methods inherited from class jview.JImageComponent |
|---|
createBufferedImage, getImage, getPreferredSize, paintComponent, setImage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_MERCATOR
public static final String KEY_XORIGIN
public static final String KEY_YORIGIN
public static final String KEY_XSCALE
public static final String KEY_YSCALE
public static final String KEY_LAMBDA0
private static final String DEFURLRESOURCES
private static final String DEFMERCATOR
private static final double DEFLAMBDA0
private static final double DEFXSCALE
private static final double DEFYSCALE
private static final double DEFXORIGIN
private static final double DEFYORIGIN
private ResourceSupplying info
| Constructor Detail |
|---|
public JEarth(ResourceSupplying info)
| Method Detail |
|---|
public ResourceSupplying getComposedProperties()
getComposedProperties in interface ResourceComposedpublic void setComposedProperties(ResourceSupplying prop)
setComposedProperties in interface ResourceAwarepublic void init()
init in interface Initializable
public Point getPixel(double lambda,
double phi)
lambda - Geographical longitude in degrees.phi - Geographical lattitude in degrees.public Point2D getGeography(Point pix)
getPixel(double, double) method using the input coordinates on the
image.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||