Statistics
| Revision:

root / org.gvsig.proj / branches / refactor2018 / org.gvsig.proj / org.gvsig.proj.catalog / org.gvsig.proj.catalog.api / src / main / java / org / gvsig / proj / catalogue / TransformationDefinition.java @ 799

History | View | Annotate | Download (4.98 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2018 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 2
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.gvsig.proj.catalogue;
25

    
26
import java.util.Set;
27

    
28
import org.gvsig.proj.catalogue.exception.NoninvertibleTransformException;
29
import org.gvsig.proj.catalogue.ref.Extent;
30

    
31
/**
32
 * Definition of a coordinate operation, a mathematical operation on coordinates that
33
 * calculates the equivalent coordinates on a different coordinate reference system.
34
 * 
35
 * Despite its name, this interface describes transformations (a particular kind of
36
 * operation which requires empirically derived parameters, for instance a datum
37
 * change) and also other kinds of operations: concatenated operations, projection
38
 * operations, etc.
39
 * 
40
 * @author  Cesar Martinez Izquierdo
41
 * @author  gvSIG Team
42
 */
43
public interface TransformationDefinition {
44
    /**
45
     * Returns the source CRS
46
     *
47
     * @return the source CRS, or {@code null} if not available.
48
     */
49
    CRSDefinition getSourceCRS();
50

    
51
    /**
52
     * Returns the target CRS
53
     *
54
     * @return the target CRS, or {@code null} if not available.
55
     */
56
    CRSDefinition getTargetCRS();
57
    
58
    /**
59
     * A common name for this coordinate operation
60
     * 
61
     * @return the name, or {@code null} if none.
62
     */
63
        String getName();
64
    
65
    /**
66
     * Gets a code that references an unambiguous definition of this coordinate operation
67
     * for some authority. Examples: "EPSG:1633", "EPSG:1632".
68
     * 
69
     * @return the identifier which was used to instantiate the object, or the
70
     * identifier that more closely matches the information used to instantiate
71
     * the object (e.g. if derived from an WKT definition)
72
     */
73
    String getIdentifier();
74
        
75
    /**
76
     * Gets the list of identifiers which describe this coordinate reference system
77
     * definition.
78
     *
79
     * @return the list of object identifiers, or an empty collection if there is none.
80
     */
81
    Set<String> getIdentifiers();
82

    
83
    /**
84
     * Version of the coordinate transformation (i.e., instantiation due to the stochastic
85
     * nature of the parameters). Mandatory when describing a transformation, and should not
86
     * be supplied for a conversion.
87
     *
88
     * @return the coordinate operation version, or {@code null} in none.
89
     */
90
    String getOperationVersion();
91

    
92
    /**
93
     * Area or region or timeframe in which this coordinate operation is valid.
94
     *
95
     * @return the coordinate operation valid domain, or {@code null} if not available.
96
     */
97
    Extent getDomainOfValidity();
98

    
99
    /**
100
     * Textual description of the coordinate reference system, including remarks
101
     * and its scope. 
102
     *
103
     * @return the description, or {@code null} if none.
104
     */
105
    String getDescription();
106

    
107
    /**
108
     * Returns true if this operation involves a change of datum, i.e., if the
109
     * source and target datums are different
110
     * 
111
     * @return
112
     */
113
    boolean isTransformation();
114
    
115
    /**
116
     * Gets the inverse of this coordinate operation.
117
     * 
118
     * @throws NoninvertibleTransformException if the inverse of this operation
119
     * is not defined
120
     */
121
    TransformationDefinition getInverse() throws NoninvertibleTransformException;
122
    
123
    /**
124
     * Returns a <cite>Well-Known Text</cite> (WKT) definition for this object.
125
     * Note that there are different versions of the WKT specification
126
     * (the older WKT defined by OGC 01-009 and the newer one, defined by OGC 12-063r5
127
     * and ISO 19162). Also note that ESRI uses different names to refer to CRSs, datums,
128
     * ellipsoids, etc. compared to OGC, so OGC and ESRI WKTs can be considered as different
129
     * dialects.
130
     * 
131
     * Whenever possible, this method will return a WKT following the same specification and
132
     * dialect that the one used to instantiate this CRSDefinition. If the original
133
     * specification or dialect are unknown, implementations are encouraged to format according
134
     * to the most recent standard and following OGC dialect.
135
     *
136
     * @return the Well-Known Text (WKT) definition for this object.
137
     * @throws UnsupportedOperationException if this object can not be formatted as WKT.
138
     */
139
        String toWKT() throws UnsupportedOperationException;
140
}