Statistics
| Revision:

root / org.gvsig.proj / branches / refactor2018 / org.gvsig.proj / org.gvsig.proj.lib / org.gvsig.proj.lib.api / src / main / java / org / cresques / cts / ICoordTrans.java @ 827

History | View | Annotate | Download (2.02 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.geom.Point2D;
27
import java.awt.geom.Rectangle2D;
28

    
29

    
30
/**
31
 * @author "Luis W. Sevilla" (sevilla_lui@gva.es)
32
 * @deprecated  Use {@link org.gvsig.proj.CoordinateTransformation} instead
33
 */
34
@Deprecated
35
public interface ICoordTrans {
36
    public IProjection getPOrig();
37

    
38
    public IProjection getPDest();
39

    
40
    public Point2D convert(Point2D ptOrig, Point2D ptDest) throws CoordTransRuntimeException;
41

    
42
    /**
43
     * Reprojects the input rectangle and returns the minimum rectangle
44
     * containing the result of that reprojection (which was not
45
     * necessarily a rectangle).
46
     *
47
     * Reprojecting the diagonal an assuming that
48
     * the result is the diagonal of the rectangle to be returned is wrong
49
     *
50
     * Reprojecting the four corners and searching for min and max
51
     * to create the resulting rectangle is not completely accurate
52
     * but provides an acceptable approximation
53
     *
54
     * @param rect
55
     * @return
56
     */
57
    public Rectangle2D convert(Rectangle2D rect) throws CoordTransRuntimeException;
58

    
59
    public ICoordTrans getInverted();
60
}