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 / catalog / TransformationDefinition.java @ 807

History | View | Annotate | Download (5.46 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.catalog;
25

    
26
import java.util.Set;
27

    
28
import org.gvsig.proj.catalog.exception.NoninvertibleTransformException;
29
import org.gvsig.proj.catalog.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
     * Gets the authority which defines this coordinate operation
85
     * (e.g. "EPSG", "ESRI", "USER"...).
86
     * 
87
     * If this transformation is defined by several
88
     * authorities, it returns the authority which was used to instantiate
89
     * the object, or the authority that more closely matches the information
90
     * used to instantiate the object (e.g. if derived from an WKT definition)
91
     * 
92
     * @return The authority name
93
     */
94
    String getAuthorityName();
95

    
96
    /**
97
     * Version of the coordinate transformation (i.e., instantiation due to the stochastic
98
     * nature of the parameters). Mandatory when describing a transformation, and should not
99
     * be supplied for a conversion.
100
     *
101
     * @return the coordinate operation version, or {@code null} in none.
102
     */
103
    String getOperationVersion();
104

    
105
    /**
106
     * Area or region or timeframe in which this coordinate operation is valid.
107
     *
108
     * @return the coordinate operation valid domain, or {@code null} if not available.
109
     */
110
    Extent getDomainOfValidity();
111

    
112
    /**
113
     * Textual description of the coordinate reference system, including remarks
114
     * and its scope. 
115
     *
116
     * @return the description, or {@code null} if none.
117
     */
118
    String getDescription();
119

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