root / org.gvsig.projection / trunk / org.gvsig.projection.api / src / main / java / org / cresques / cts / IProjection.java @ 207
History | View | Annotate | Download (2.68 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 org.cresques.geo.ViewPortData; |
27 |
|
28 |
import java.awt.Color; |
29 |
import java.awt.Graphics2D; |
30 |
import java.awt.geom.Point2D; |
31 |
import java.awt.geom.Rectangle2D; |
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 IDatum getDatum();
|
42 |
|
43 |
public Point2D createPoint(double x, double y); |
44 |
|
45 |
// TODO Quitar si no son necesarias.
|
46 |
public String getAbrev(); |
47 |
|
48 |
/**
|
49 |
* Devuelve getAbrev() mas los parametros de transformacion si los hay
|
50 |
* ej.: (EPSG:23030:proj@+proj...@...)
|
51 |
*
|
52 |
* @return getAbrev() o getAbrev()+parametros
|
53 |
*/
|
54 |
public String getFullCode(); |
55 |
|
56 |
public void drawGrid(Graphics2D g, ViewPortData vp); |
57 |
|
58 |
public void setGridColor(Color c); |
59 |
|
60 |
public Color getGridColor(); |
61 |
|
62 |
/**
|
63 |
* Crea un ICoordTrans para transformar coordenadas
|
64 |
* desde el IProjection actual al dest.
|
65 |
* @param dest
|
66 |
* @return
|
67 |
*/
|
68 |
|
69 |
public ICoordTrans getCT(IProjection dest);
|
70 |
|
71 |
public Point2D toGeo(Point2D pt); |
72 |
|
73 |
public Point2D fromGeo(Point2D gPt, Point2D mPt); |
74 |
|
75 |
public boolean isProjected(); |
76 |
|
77 |
/**
|
78 |
* First two parameters must be in meters.
|
79 |
* This should be changed (map units should be used) and then
|
80 |
* change the places where this method is used.
|
81 |
*
|
82 |
* @param minX in meters
|
83 |
* @param maxX in meters
|
84 |
* @param width in pixels (dots)
|
85 |
* @param dpi dots per inch
|
86 |
* @return Scale denominator ( the "X" in "1 : X" )
|
87 |
*/
|
88 |
public double getScale(double minX, double maxX, double width, double dpi); |
89 |
|
90 |
public Rectangle2D getExtent(Rectangle2D extent,double scale,double wImage,double hImage,double mapUnits,double distanceUnits,double dpi); |
91 |
} |