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 @ 794

History | View | Annotate | Download (6.47 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
         * Register a user-defined CRS from an WKT definition
118
         * 
119
         * @param wktDefinition The WKT definition of the CRS to register
120
         * @param description A human-readable description of the CRS
121
         * @return The code assigned to the registered CRS on the USER
122
         * namespace
123
         */
124
        String registerCoordinateReferenceSystem(String wktDefinition, String description);
125
        
126
        /**
127
         * Register a user-defined coordinate operation
128
         * 
129
         * @param wktDefinition The WKT definition of the operation to register
130
         * @param description A human-readable description of the CRS
131
         * @return The code assigned to the registered CRS on the USER
132
         * namespace
133
         */
134
        String registerTransformation(String wktDefinition, String description);
135
        
136
        /**
137
         * Register a user-defined coordinate transformation using the Position
138
         * Vector Transformation method
139
         * 
140
         * @param definition The WKT definition of the operation to register
141
         * @return The code assigned to the registered CRS on the USER
142
         * namespace
143
         * @see #registerCoordinateTransformationCFR(String, String, String, float, float, float, float, float, float, float)
144
         */
145
        String registerCoordinateTransformationPVT(String sourceCRS, String targetCRS,
146
                        String description,
147
                        float xTraslation, float yTraslation, float zTraslation,
148
                        float xRotation, float yRotation, float zRotation,
149
                        float scaleDifference);
150

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

    
188
        /**
189
         * Gets the list of available CoordinatesOperations to transform or
190
         * convert coordinates from the source CoordinateReferenceSystem to
191
         * the target one.
192
         * 
193
         * @param source The code of the source CRS (e.g. "ESPG:25830")
194
         * @param target The code of the target CRS (e.g. "ESPG:4230")
195
         * @return
196
         */
197
        List<TransformationDefinition> getCoordinateOperations(String source, String target);
198
}