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 / CRSCatalogManager.java @ 797

History | View | Annotate | Download (6.74 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2012 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.io.File;
27
import java.util.List;
28

    
29
/**
30
 * This class is responsible of the management of the CRSCatalog
31
 * library's business logic.
32
 * 
33
 * It is the library's main entry point, and provides all the services to manage
34
 * {@link CRSDefinition}s and {@link TransformationDefinition}s.
35
 * 
36
 * @author gvSIG team
37
 * @author Cesar Martinez Izquierdo
38
 */
39
public interface CRSCatalogManager {
40

    
41
        /**
42
         * Returns a List of String values with the available authority names.
43
         * 
44
         * @return the available authority names
45
         */
46
        List<String> getAuthorityNames();
47

    
48
        /**
49
         * Returns a List of String values with the codes available for all the
50
         * available authorities
51
         *
52
         * @return the list of available codes, using the AUTHORITY:CODE format
53
         */
54
        List<String> getCodes();
55

    
56
        /**
57
         * Returns a List of String values with the codes available for a given
58
         * Authority,
59
         * 
60
         * @param authorityName
61
         *            name of the authority to get the codes of
62
         * @return the list of available codes, using the AUTHORITY:CODE format
63
         */
64
        List<String> getCodes(String authorityName);
65
        
66
        /**
67
         * Returns a list of codes that match the provided search string.
68
         * Examples of valid searchString: "4326", "EPSG:4326", "ESRI:4326", etc.
69
         * Depending on the implementation of the catalogue, it may search only
70
         * codes or it may search on several CRS fields (name, description,
71
         * area description, etc)
72
         * 
73
         * @param searchString
74
         * @return
75
         */
76
        List<String> search(String searchString);
77
        
78
        /**
79
         * Returns a list of codes that match the provided search string.
80
         * Examples of valid searchString: "4326", "EPSG:4326", "ESRI:4326", etc.
81
         * Depending on the implementation of the catalog, it may only search for
82
         * codes or it may search on several CRS fields (name, description,
83
         * area description, etc)
84
         * 
85
         * @param searchString
86
         * @return
87
         */
88
        List<String> search(String authority, String searchString);
89
        
90
        /**
91
         * Gets the CRSDefinition for the provided code
92
         * @param code The CRS code (e.g. "EPSG:4326", "ESRI:4326")
93
         * 
94
         * @return
95
         */
96
        CRSDefinition getCRSDefinition(String code);
97
        
98
        
99
        /**
100
         * Parses the provided WKT CRS definition to create a
101
         * CRSDefinition object 
102
         * @param wkt The WKT CRS definition
103
         * 
104
         * @return
105
         */
106
        CRSDefinition getCRSDefinitionFromWKT(String wkt); // anyadir formato
107
        
108
        /**
109
         * Gets the TransformationDefinition for the provided code
110
         * @param code The operation code (e.g. "EPSG:1633", "EPSG:1632")
111
         * 
112
         * @return
113
         */
114
        TransformationDefinition getTransformationDefinition(String code);
115
        
116
        /**
117
         * Parses the provided WKT transformation definition to create a
118
         * TransformationDefinition object
119
         * @param wkt The WKT coordinate operation definition
120
         * 
121
         * @return
122
         */
123
        TransformationDefinition getTransformationDefinitionFromWKT(String wkt);
124

    
125
        /**
126
         * Register a user-defined CRS from an WKT definition
127
         * 
128
         * @param wktDefinition The WKT definition of the CRS to register
129
         * @param description A human-readable description of the CRS
130
         * @return The code assigned to the registered CRS on the USER
131
         * namespace
132
         */
133
        String registerCoordinateReferenceSystem(String wktDefinition, String description);
134
        
135
        /**
136
         * Register a user-defined coordinate operation
137
         * 
138
         * @param wktDefinition The WKT definition of the operation to register
139
         * @param description A human-readable description of the CRS
140
         * @return The code assigned to the registered CRS on the USER
141
         * namespace
142
         */
143
        String registerTransformation(String wktDefinition, String description);
144
        
145
        /**
146
         * Register a user-defined coordinate transformation using the Position
147
         * Vector Transformation method
148
         * 
149
         * @param definition The WKT definition of the operation to register
150
         * @return The code assigned to the registered CRS on the USER
151
         * namespace
152
         * @see #registerCoordinateTransformationCFR(String, String, String, float, float, float, float, float, float, float)
153
         */
154
        String registerCoordinateTransformationPVT(String sourceCRS, String targetCRS,
155
                        String description,
156
                        float xTraslation, float yTraslation, float zTraslation,
157
                        float xRotation, float yRotation, float zRotation,
158
                        float scaleDifference);
159

    
160
        /**
161
         * Register a user-defined coordinate transformation using the Coordinate
162
         * Frame Rotation method
163
         * 
164
         * @param definition The WKT definition of the operation to register
165
         * @return The code assigned to the registered CRS on the USER
166
         * namespace
167
         * @see #registerCoordinateTransformationPVT(String, String, String, float, float, float, float, float, float, float)
168
         */
169
        String registerCoordinateTransformationCFR(String sourceCRS, String targetCRS,
170
                        String description,
171
                        float xTraslation, float yTraslation, float zTraslation,
172
                        float xRotation, float yRotation, float zRotation,
173
                        float scaleDifference);
174
        
175
        /**
176
         * Register a user-defined coordinate transformation using a
177
         * transformation grid in NTv2 format
178
         * 
179
         * @param definition The WKT definition of the operation to register
180
         * @return The code assigned to the registered CRS on the USER
181
         * namespace
182
         */
183
        String registerCoordinateTransformation(String sourceCRS, String targetCRS,
184
                        String description, File ntv2Grid);
185
        
186
        
187
        /**
188
         * Gets the list of available TransformationDefinition to transform or
189
         * convert coordinates from the source CoordinateReferenceSystem to
190
         * the target one. 
191
         * @param source
192
         * @param target
193
         * @return
194
         */
195
        List<TransformationDefinition> getCoordinateTransformations(CRSDefinition source, CRSDefinition target);
196

    
197
        /**
198
         * Gets the list of available TransformationDefinition to transform or
199
         * convert coordinates from the source CoordinateReferenceSystem to
200
         * the target one.
201
         * 
202
         * @param source The code of the source CRS (e.g. "ESPG:25830")
203
         * @param target The code of the target CRS (e.g. "ESPG:4230")
204
         * @return
205
         */
206
        List<TransformationDefinition> getCoordinateTransformations(String source, String target);
207
}