root / org.gvsig.proj / branches / refactor2018 / org.gvsig.proj / org.gvsig.proj.lib / org.gvsig.proj.lib.api / src / main / java / org / gvsig / proj / CoordinateReferenceSystemManager.java @ 827
History | View | Annotate | Download (5.52 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; |
25 |
|
26 |
import java.text.ParseException; |
27 |
|
28 |
import org.gvsig.proj.catalog.CRSCatalogManager; |
29 |
import org.gvsig.proj.catalog.CRSDefinition; |
30 |
import org.gvsig.proj.catalog.TextSerialization; |
31 |
import org.gvsig.proj.catalog.TransformationDefinition; |
32 |
import org.gvsig.proj.catalog.exception.UnsupportedTransformationException; |
33 |
import org.gvsig.proj.catalog.exception.UnsupportedCoordinateReferenceSystemException; |
34 |
import org.gvsig.proj.catalog.exception.UnsupportedFormatException; |
35 |
|
36 |
/**
|
37 |
* This class is responsible of the management of the CoordinateReferenceSystem
|
38 |
* library's business logic.
|
39 |
* It is the library's main entry point, and provides all the services to manage
|
40 |
* {@link CoordinateReferenceSystem}s.
|
41 |
*
|
42 |
* @author gvSIG team
|
43 |
* @version $Id$
|
44 |
*/
|
45 |
public interface CoordinateReferenceSystemManager { |
46 |
/**
|
47 |
* Parses the provided CRS definition to create a {@link CoordinateReferenceSystem} object
|
48 |
*
|
49 |
* @param def A string containing the definition to parse (e.g. a WKT
|
50 |
* CRS definition, a GML CRS definition, etc)
|
51 |
* @return A {@link CoordinateReferenceSystem} object
|
52 |
* @throws CoordinateReferenceSystemException if the reference system is not supported by
|
53 |
* this implementation
|
54 |
* @throws ParseException if the provided definition can't be parsed (for instance because it is not
|
55 |
* a valid document in any of the supported formats)
|
56 |
*/
|
57 |
CoordinateReferenceSystem parseCoordinateReferenceSystem(String def)
|
58 |
throws UnsupportedCoordinateReferenceSystemException, ParseException; |
59 |
|
60 |
/**
|
61 |
* Parses the provided CRS definition to create a {@link CoordinateReferenceSystem} object
|
62 |
*
|
63 |
* @param def A string containing the definition to parse (e.g. a WKT
|
64 |
* definition, a GML definition, etc)
|
65 |
* @param format The format of the definition to parse
|
66 |
* @return A {@link CoordinateReferenceSystem} object
|
67 |
* @throws UnsupportedCoordinateReferenceSystemException if the reference system is not supported by
|
68 |
* this implementation
|
69 |
* @throws ParseException if the provided string can't be parsed, for instance if the format is
|
70 |
* not supported or if the string is not valid
|
71 |
*/
|
72 |
CoordinateReferenceSystem parseCoordinateReferenceSystem(String def, TextSerialization.Format format)
|
73 |
throws UnsupportedCoordinateReferenceSystemException, ParseException, UnsupportedFormatException; |
74 |
|
75 |
/**
|
76 |
* Returns a Coordinate Reference System.
|
77 |
*
|
78 |
* @param definition
|
79 |
* @throws ParseException
|
80 |
* @throws UnsupportedOperationException
|
81 |
* @throws CoordinateReferenceSystemException
|
82 |
*/
|
83 |
CoordinateReferenceSystem getCoordinateReferenceSystem( |
84 |
CRSDefinition definition) |
85 |
throws UnsupportedCoordinateReferenceSystemException, ParseException; |
86 |
|
87 |
/**
|
88 |
* Parses the provided transformation definition to create a {@link CoordinateTransformation} object
|
89 |
*
|
90 |
* @param def A string containing the definition to parse (e.g. a WKT
|
91 |
* definition, a GML definition, etc)
|
92 |
* @return A {@link CoordinateTransformation} object
|
93 |
* @throws UnsupportedTransformationException if the transformation is not supported by
|
94 |
* this implementation
|
95 |
* @throws ParseException if the provided string can't be parsed (for instance because it is not
|
96 |
* a valid document in any of the supported formats)
|
97 |
*/
|
98 |
CoordinateTransformation parseCoordinateTransformation(String def)
|
99 |
throws UnsupportedTransformationException, ParseException; |
100 |
|
101 |
/**
|
102 |
* Parses the provided CRS definition to create a {@link TransformationDefinition} object
|
103 |
*
|
104 |
* @param def A string containing the definition to parse (e.g. a WKT
|
105 |
* definition, a GML definition, etc)
|
106 |
* @param format The format of the definition to parse
|
107 |
* @return A {@link TransformationDefinition} object
|
108 |
* @throws UnsupportedTransformationException if the transformation is not supported by
|
109 |
* this implementation
|
110 |
* @throws ParseException if the provided string can't be parsed, for instance if the format is
|
111 |
* not supported or if the string is not valid
|
112 |
* @throws UnsupportedFormatException if the format is not supported
|
113 |
*/
|
114 |
CoordinateTransformation parseCoordinateTransformation(String def, TextSerialization.Format format)
|
115 |
throws UnsupportedTransformationException, ParseException, UnsupportedFormatException; |
116 |
|
117 |
/**
|
118 |
* Returns a Coordinate Transformation
|
119 |
*
|
120 |
* @param definition
|
121 |
* @throws ParseException
|
122 |
* @throws CoordinateReferenceSystemException
|
123 |
*/
|
124 |
CoordinateTransformation getCoordinateTransformation( |
125 |
TransformationDefinition definition) |
126 |
throws UnsupportedTransformationException, ParseException; |
127 |
|
128 |
|
129 |
/**
|
130 |
* Sets the catalog instance to use for retrieving definitions
|
131 |
*
|
132 |
* @return
|
133 |
*/
|
134 |
void setCatalogManager(CRSCatalogManager manager);
|
135 |
} |