Blame view

src/jsky/coords/WorldCoordinateConverter.java 2.05 KB
fe0fb87e   Elodie Bourrec   First push to cre...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * $Id: WorldCoordinateConverter.java,v 1.2 2009/04/21 13:31:17 abrighto Exp $
 */

package jsky.coords;

import java.awt.geom.Point2D;

import javax.swing.event.ChangeListener;


/**
 * This defines the interface for converting between image and world coordinates.
 *
 * @version $Revision: 1.2 $
 * @author Allan Brighton
 */
public abstract interface WorldCoordinateConverter {

    /**
     * Return true if world coordinates conversion is available. This method
     * should be called to check before calling any of the world coordinates
     * conversion methods.
     */
    public boolean isWCS();

    /** Return the equinox used for coordinates (usually the equionx of the image) */
    public double getEquinox();

    /**
     * Convert the given image coordinates to world coordinates degrees in the equinox
     * of the current image.
     *
     * @param p The point to convert.
     * @param isDistance True if p should be interpreted as a distance instead
     *                   of a point.
     */
    public void imageToWorldCoords(Point2D.Double p, boolean isDistance);

    /**
     * Convert the given world coordinates (degrees, in the equinox of the current image)
     * to image coordinates.
     *
     * @param p The point to convert.
     * @param isDistance True if p should be interpreted as a distance instead
     *                   of a point.
     */
    public void worldToImageCoords(Point2D.Double p, boolean isDistance);

    /** Return the center RA,Dec coordinates in degrees. */
    public Point2D.Double getWCSCenter();

    /** Set the center RA,Dec coordinates in degrees. */
    //public void setWCSCenter(Point2D.Double p);

    /** return the width in deg */
    public double getWidthInDeg();

    /** return the height in deg */
    public double getHeightInDeg();

    /** Return the image center coordinates in pixels (image coordinates). */
    public Point2D.Double getImageCenter();

    /** Return the image width in pixels. */
    public double getWidth();

    /** Return the image height in pixels. */
    public double getHeight();
}