Statistics
| Revision:

root / org.gvsig.projection / trunk / org.gvsig.projection.api / src / main / java / org / cresques / cts / IProjection.java @ 431

History | View | Annotate | Download (2.71 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.cresques.cts;
25

    
26
import java.awt.Color;
27
import java.awt.Graphics2D;
28
import java.awt.geom.Point2D;
29
import java.awt.geom.Rectangle2D;
30

    
31
import org.cresques.geo.ViewPortData;
32

    
33
import org.gvsig.tools.lang.Cloneable;
34

    
35
/**
36
 *
37
 * @author "Luis W. Sevilla" (sevilla_lui@gva.es)
38
 */
39
public interface IProjection extends Cloneable{
40

    
41
    public String export(String format);
42

    
43
    public IDatum getDatum();
44

    
45
    public Point2D createPoint(double x, double y);
46

    
47
    // TODO Quitar si no son necesarias.
48
    public String getAbrev();
49

    
50
    /**
51
     * Devuelve getAbrev() mas los parametros de transformacion si los hay
52
     * ej.: (EPSG:23030:proj@+proj...@...)
53
     *
54
     * @return getAbrev() o getAbrev()+parametros
55
     */
56
    public String getFullCode();
57

    
58
    public void drawGrid(Graphics2D g, ViewPortData vp);
59

    
60
    public void setGridColor(Color c);
61

    
62
    public Color getGridColor();
63

    
64
    /**
65
     * Crea un ICoordTrans para transformar coordenadas
66
     * desde el IProjection actual al dest.
67
     * @param dest
68
     * @return
69
     */
70

    
71
    public ICoordTrans getCT(IProjection dest);
72

    
73
    public Point2D toGeo(Point2D pt);
74

    
75
    public Point2D fromGeo(Point2D gPt, Point2D mPt);
76

    
77
    public boolean isProjected();
78

    
79
    /**
80
     * First two parameters must be in meters.
81
     * This should be changed (map units should be used) and then
82
     * change the places where this method is used.
83
     *
84
     * @param minX in meters
85
     * @param maxX in meters
86
     * @param width in pixels (dots)
87
     * @param dpi dots per inch
88
     * @return Scale denominator ( the "X" in "1 : X" )
89
     */
90
    public double getScale(double minX, double maxX, double width, double dpi);
91

    
92
    public Rectangle2D getExtent(Rectangle2D extent,double scale,double wImage,double hImage,double mapUnits,double distanceUnits,double dpi);
93
}