Revision 794
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/test/java/org/gvsig/proj/CRSCatalogueManagerIT.java | ||
---|---|---|
24 | 24 |
|
25 | 25 |
import java.util.List; |
26 | 26 |
|
27 |
import org.gvsig.proj.catalogue.CRSCatalogueManager;
|
|
27 |
import org.gvsig.proj.catalogue.CRSCatalogManager; |
|
28 | 28 |
import org.gvsig.proj.catalogue.CRSDefinition; |
29 | 29 |
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase; |
30 | 30 |
|
... | ... | |
36 | 36 |
public abstract class CRSCatalogueManagerIT extends |
37 | 37 |
AbstractLibraryAutoInitTestCase { |
38 | 38 |
|
39 |
protected CRSCatalogueManager manager;
|
|
39 |
protected CRSCatalogManager manager; |
|
40 | 40 |
|
41 | 41 |
protected void doSetUp() throws Exception { |
42 | 42 |
manager = createProjectionManager(); |
... | ... | |
47 | 47 |
* |
48 | 48 |
* @return the {@link CoordinateReferenceSystemManager} instance |
49 | 49 |
*/ |
50 |
protected abstract CRSCatalogueManager createProjectionManager();
|
|
50 |
protected abstract CRSCatalogManager createProjectionManager(); |
|
51 | 51 |
|
52 | 52 |
/** |
53 | 53 |
* Returns the authority name to use to create the projections to test. |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/test/java/org/gvsig/proj/CRSCatalogLocatorTest.java | ||
---|---|---|
26 | 26 |
import java.util.List; |
27 | 27 |
|
28 | 28 |
import org.gvsig.proj.catalogue.CRSCatalogLocator; |
29 |
import org.gvsig.proj.catalogue.CRSCatalogueManager;
|
|
29 |
import org.gvsig.proj.catalogue.CRSCatalogManager; |
|
30 | 30 |
import org.gvsig.proj.catalogue.CRSDefinition; |
31 |
import org.gvsig.proj.catalogue.CoordinateOperationDefinition;
|
|
31 |
import org.gvsig.proj.catalogue.TransformationDefinition;
|
|
32 | 32 |
import org.gvsig.tools.dynobject.DynObject; |
33 | 33 |
|
34 | 34 |
import junit.framework.TestCase; |
... | ... | |
48 | 48 |
public void testRegisterManager() { |
49 | 49 |
CRSCatalogLocator |
50 | 50 |
.registerManager(DummyCRSCatalogueManager.class); |
51 |
CRSCatalogueManager manager =
|
|
51 |
CRSCatalogManager manager = |
|
52 | 52 |
CRSCatalogLocator.getManager(); |
53 | 53 |
assertTrue(manager instanceof DummyCRSCatalogueManager); |
54 | 54 |
} |
55 | 55 |
|
56 | 56 |
public static class DummyCRSCatalogueManager implements |
57 |
CRSCatalogueManager {
|
|
57 |
CRSCatalogManager { |
|
58 | 58 |
|
59 | 59 |
public List getAuthorityNames() { |
60 | 60 |
// Nothing to do |
... | ... | |
112 | 112 |
} |
113 | 113 |
|
114 | 114 |
@Override |
115 |
public CoordinateOperationDefinition getCSDefinition(String code) {
|
|
115 |
public TransformationDefinition getTransformationDefinition(String code) {
|
|
116 | 116 |
// TODO Auto-generated method stub |
117 | 117 |
return null; |
118 | 118 |
} |
... | ... | |
153 | 153 |
} |
154 | 154 |
|
155 | 155 |
@Override |
156 |
public List<CoordinateOperationDefinition> getCoordinateOperations(CRSDefinition source, CRSDefinition target) {
|
|
156 |
public List<TransformationDefinition> getCoordinateOperations(CRSDefinition source, CRSDefinition target) {
|
|
157 | 157 |
// TODO Auto-generated method stub |
158 | 158 |
return null; |
159 | 159 |
} |
160 | 160 |
|
161 | 161 |
@Override |
162 |
public List<CoordinateOperationDefinition> getCoordinateOperations(String source, String target) {
|
|
162 |
public List<TransformationDefinition> getCoordinateOperations(String source, String target) {
|
|
163 | 163 |
// TODO Auto-generated method stub |
164 | 164 |
return null; |
165 | 165 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/CRSCatalogException.java | ||
---|---|---|
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 org.gvsig.tools.exception.BaseException; |
|
27 |
|
|
28 |
/** |
|
29 |
* Generic exception thrown in the CoordinateReferenceSystem API when the |
|
30 |
* exception or error |
|
31 |
* may be dealt by the program or the user of the program which is a client of |
|
32 |
* the CoordinateReferenceSystem API. |
|
33 |
* |
|
34 |
* @see {@link CoordinateReferenceSystemManager} |
|
35 |
* @author gvSIG team. |
|
36 |
* @version $Id$ |
|
37 |
*/ |
|
38 |
public class CRSCatalogException extends BaseException { |
|
39 |
|
|
40 |
private static final long serialVersionUID = 6756475060924237176L; |
|
41 |
|
|
42 |
private static final String MESSAGE = |
|
43 |
"An error has been produced in the CRSCatalog library"; |
|
44 |
|
|
45 |
private static final String KEY = "_CRSCatalogException"; |
|
46 |
|
|
47 |
/** |
|
48 |
* Constructor to be used in rare cases, usually you must create a new child |
|
49 |
* exception class for each case. |
|
50 |
* <strong>Don't use this constructor in child classes.</strong> |
|
51 |
*/ |
|
52 |
public CRSCatalogException() { |
|
53 |
super(MESSAGE, KEY, serialVersionUID); |
|
54 |
} |
|
55 |
|
|
56 |
/** |
|
57 |
* Constructor to be used in rare cases, usually you must create a new child |
|
58 |
* exception class for each case. |
|
59 |
* <p> |
|
60 |
* <strong>Don't use this constructor in child classes.</strong> |
|
61 |
* </p> |
|
62 |
* |
|
63 |
* @param cause |
|
64 |
* the original cause of the exception |
|
65 |
*/ |
|
66 |
public CRSCatalogException(Exception cause) { |
|
67 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
68 |
} |
|
69 |
|
|
70 |
/** |
|
71 |
* @see BaseException#BaseException(String, String, long). |
|
72 |
* @param message |
|
73 |
* the default messageFormat to describe the exception |
|
74 |
* @param key |
|
75 |
* the key to use to search a localized messageFormnata |
|
76 |
* @param code |
|
77 |
* the unique code to identify the exception |
|
78 |
*/ |
|
79 |
protected CRSCatalogException(String message, String key, |
|
80 |
long code) { |
|
81 |
super(message, key, code); |
|
82 |
} |
|
83 |
|
|
84 |
/** |
|
85 |
* @see BaseException#BaseException(String, Throwable, String, long). |
|
86 |
* @param message |
|
87 |
* the default messageFormat to describe the exception |
|
88 |
* @param cause |
|
89 |
* the original cause of the exception |
|
90 |
* @param key |
|
91 |
* the key to use to search a localized messageFormnata |
|
92 |
* @param code |
|
93 |
* the unique code to identify the exception |
|
94 |
*/ |
|
95 |
protected CRSCatalogException(String message, |
|
96 |
Throwable cause, String key, long code) { |
|
97 |
super(message, cause, key, code); |
|
98 |
} |
|
99 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/CoordinateOperationDefinition.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2018 gvSIG Association. |
|
5 |
* |
|
6 |
* This file has been adapted from GeoAPI, see |
|
7 |
* the original copyright headers bellow. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
22 |
* MA 02110-1301, USA. |
|
23 |
* |
|
24 |
* For any additional information, do not hesitate to contact us |
|
25 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
26 |
* |
|
27 |
* ---------- |
|
28 |
* |
|
29 |
* GeoAPI - Java interfaces for OGC/ISO standards |
|
30 |
* http://www.geoapi.org |
|
31 |
* |
|
32 |
* Copyright (C) 2004-2017 Open Geospatial Consortium, Inc. |
|
33 |
* All Rights Reserved. http://www.opengeospatial.org/ogc/legal |
|
34 |
* |
|
35 |
* Permission to use, copy, and modify this software and its documentation, with |
|
36 |
* or without modification, for any purpose and without fee or royalty is hereby |
|
37 |
* granted, provided that you include the following on ALL copies of the software |
|
38 |
* and documentation or portions thereof, including modifications, that you make: |
|
39 |
* |
|
40 |
* 1. The full text of this NOTICE in a location viewable to users of the |
|
41 |
* redistributed or derivative work. |
|
42 |
* 2. Notice of any changes or modifications to the OGC files, including the |
|
43 |
* date changes were made. |
|
44 |
* |
|
45 |
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE |
|
46 |
* NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED |
|
47 |
* TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT |
|
48 |
* THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY |
|
49 |
* PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. |
|
50 |
* |
|
51 |
* COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR |
|
52 |
* CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. |
|
53 |
* |
|
54 |
* The name and trademarks of copyright holders may NOT be used in advertising or |
|
55 |
* publicity pertaining to the software without specific, written prior permission. |
|
56 |
* Title to copyright in this software and any associated documentation will at all |
|
57 |
* times remain with copyright holders. |
|
58 |
*/ |
|
59 |
package org.gvsig.proj.catalogue; |
|
60 |
|
|
61 |
import org.gvsig.proj.catalogue.ref.Extent; |
|
62 |
|
|
63 |
/** |
|
64 |
* A mathematical operation on coordinates that transforms or converts coordinates to |
|
65 |
* another coordinate reference system. |
|
66 |
* |
|
67 |
* <h3>Inverse operation</h3> |
|
68 |
* Many but not all coordinate operations (from |
|
69 |
* {@linkplain CoordinateReferenceSystem coordinate reference system} <var>A</var> to |
|
70 |
* {@linkplain CoordinateReferenceSystem coordinate reference system} <var>B</var>) |
|
71 |
* also uniquely define the inverse operation (from |
|
72 |
* {@linkplain CoordinateReferenceSystem coordinate reference system} <var>B</var> to |
|
73 |
* {@linkplain CoordinateReferenceSystem coordinate reference system} <var>A</var>). |
|
74 |
* In some cases, the operation method algorithm for the inverse operation is the same |
|
75 |
* as for the forward algorithm, but the signs of some operation parameter values must |
|
76 |
* be reversed. In other cases, different algorithms are required for the forward and |
|
77 |
* inverse operations, but the same operation parameter values are used. If (some) |
|
78 |
* entirely different parameter values are needed, a different coordinate operation |
|
79 |
* shall be defined. |
|
80 |
* |
|
81 |
* Note: gvSIG derived these interfaces from GeoAPI in order to have a simpler API and also to |
|
82 |
* avoid namespace collisions (e.g. GeoAPI 3 vs GeoTools interfaces). There is no plans |
|
83 |
* to evolve these interfaces to adapt them to future GeoAPI versions. |
|
84 |
* |
|
85 |
* @author gvSIG Team |
|
86 |
* @author Martin Desruisseaux (IRD) |
|
87 |
* @version 3.1 |
|
88 |
* @since 1.0 |
|
89 |
* |
|
90 |
* @see CoordinateOperationAuthorityFactory#createCoordinateOperation(String) |
|
91 |
* @see CoordinateOperationAuthorityFactory#createFromCoordinateReferenceSystemCodes(String, String) |
|
92 |
* @see CoordinateOperationFactory#createOperation(CoordinateReferenceSystem, CoordinateReferenceSystem) |
|
93 |
*/ |
|
94 |
public interface CoordinateOperationDefinition extends IdentifiedObject { |
|
95 |
/** |
|
96 |
* Returns the source CRS. The source CRS is mandatory for {@linkplain Transformation transformations} only. |
|
97 |
* {@linkplain Conversion Conversions} may have a source CRS that is not specified here, but through |
|
98 |
* {@link org.opengis.referencing.crs.GeneralDerivedCRS#getBaseCRS()} instead. |
|
99 |
* |
|
100 |
* @return the source CRS, or {@code null} if not available. |
|
101 |
* |
|
102 |
* @see Conversion#getSourceCRS() |
|
103 |
* @see Transformation#getSourceCRS() |
|
104 |
*/ |
|
105 |
CRSDefinition getSourceCRS(); |
|
106 |
|
|
107 |
/** |
|
108 |
* Returns the target CRS. The target CRS is mandatory for {@linkplain Transformation transformations} only. |
|
109 |
* {@linkplain Conversion Conversions} may have a target CRS that is not specified here, but through |
|
110 |
* {@link org.opengis.referencing.crs.GeneralDerivedCRS} instead. |
|
111 |
* |
|
112 |
* @return the target CRS, or {@code null} if not available. |
|
113 |
* |
|
114 |
* @see Conversion#getTargetCRS() |
|
115 |
* @see Transformation#getTargetCRS() |
|
116 |
*/ |
|
117 |
CRSDefinition getTargetCRS(); |
|
118 |
|
|
119 |
/** |
|
120 |
* Version of the coordinate transformation (i.e., instantiation due to the stochastic |
|
121 |
* nature of the parameters). Mandatory when describing a transformation, and should not |
|
122 |
* be supplied for a conversion. |
|
123 |
* |
|
124 |
* @return the coordinate operation version, or {@code null} in none. |
|
125 |
*/ |
|
126 |
String getOperationVersion(); |
|
127 |
|
|
128 |
/** |
|
129 |
* Area or region or timeframe in which this coordinate operation is valid. |
|
130 |
* |
|
131 |
* @return the coordinate operation valid domain, or {@code null} if not available. |
|
132 |
* |
|
133 |
* @since 2.1 |
|
134 |
*/ |
|
135 |
Extent getDomainOfValidity(); |
|
136 |
|
|
137 |
/** |
|
138 |
* Description of domain of usage, or limitations of usage, for which this operation is valid. |
|
139 |
* |
|
140 |
* @return a description of domain of usage, or {@code null} if none. |
|
141 |
* |
|
142 |
* @departure historic |
|
143 |
* This method has been kept conformant with the specification published in 2003. |
|
144 |
* The revision published in 2007 replaced the singleton by a collection and changed the |
|
145 |
* obligation from "optional" to "mandatory", requiring a return value of |
|
146 |
* <cite>"not known"</cite> if the scope is unknown. This change is still under review. |
|
147 |
*/ |
|
148 |
String getScope(); |
|
149 |
|
|
150 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/CoordinateOperationNotFoundException.java | ||
---|---|---|
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 |
/** |
|
27 |
* Exception thrown when there is a {@link CoordinateReferenceSystem} is not |
|
28 |
* found. |
|
29 |
* |
|
30 |
* @author gvSIG team |
|
31 |
* @version $Id$ |
|
32 |
*/ |
|
33 |
public class CoordinateOperationNotFoundException extends |
|
34 |
CRSCatalogException { |
|
35 |
|
|
36 |
private static final long serialVersionUID = -5936207106375683418L; |
|
37 |
|
|
38 |
private static final String MESSAGE = |
|
39 |
"The coordinate operation with Authority: %(authority) " |
|
40 |
+ "and Code: %(code) is not available"; |
|
41 |
|
|
42 |
private static final String KEY = "_CoordinateOperationNotFoundException"; |
|
43 |
|
|
44 |
/** |
|
45 |
* Creates a new {@link CoordinateOperationNotFoundException}. |
|
46 |
* |
|
47 |
* @param cause |
|
48 |
* the original cause |
|
49 |
*/ |
|
50 |
public CoordinateOperationNotFoundException(String authority, |
|
51 |
String code) { |
|
52 |
super(MESSAGE, KEY, serialVersionUID); |
|
53 |
setValue("authority", authority); |
|
54 |
setValue("code", code); |
|
55 |
} |
|
56 |
|
|
57 |
/** |
|
58 |
* Creates a new {@link CoordinateOperationNotFoundException}. |
|
59 |
* |
|
60 |
* @param cause |
|
61 |
* the original cause |
|
62 |
*/ |
|
63 |
public CoordinateOperationNotFoundException(String authority, |
|
64 |
String code, Throwable cause) { |
|
65 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
66 |
setValue("authority", authority); |
|
67 |
setValue("code", code); |
|
68 |
} |
|
69 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/CRSCatalogueManager.java | ||
---|---|---|
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 |
import org.gvsig.tools.dynobject.DynObject; |
|
30 |
|
|
31 |
/** |
|
32 |
* This class is responsible of the management of the CoordinateReferenceSystem |
|
33 |
* library's business logic. |
|
34 |
* It is the library's main entry point, and provides all the services to manage |
|
35 |
* {@link CoordinateReferenceSystem}s. |
|
36 |
* |
|
37 |
* @author gvSIG team |
|
38 |
* @version $Id$ |
|
39 |
*/ |
|
40 |
public interface CRSCatalogueManager { |
|
41 |
|
|
42 |
/** |
|
43 |
* Returns a List of String values with the available authority names. |
|
44 |
* |
|
45 |
* @return the available authority names |
|
46 |
*/ |
|
47 |
List<String> getAuthorityNames(); |
|
48 |
|
|
49 |
/** |
|
50 |
* Returns a List of String values with the codes available for all the |
|
51 |
* available authorities |
|
52 |
* |
|
53 |
* @return the list of available codes, using the AUTHORITY:CODE format |
|
54 |
*/ |
|
55 |
List<String> getCodes(); |
|
56 |
|
|
57 |
/** |
|
58 |
* Returns a List of String values with the codes available for a given |
|
59 |
* Authority, |
|
60 |
* |
|
61 |
* @param authorityName |
|
62 |
* name of the authority to get the codes of |
|
63 |
* @return the list of available codes, using the AUTHORITY:CODE format |
|
64 |
*/ |
|
65 |
List<String> getCodes(String authorityName); |
|
66 |
|
|
67 |
/** |
|
68 |
* Returns a list of codes that match the provided search string. |
|
69 |
* Examples of valid searchString: "4326", "EPSG:4326", "ESRI:4326", etc. |
|
70 |
* Depending on the implementation of the catalogue, it may search only |
|
71 |
* codes or it may search on several CRS fields (name, description, |
|
72 |
* area description, etc) |
|
73 |
* |
|
74 |
* @param searchString |
|
75 |
* @return |
|
76 |
*/ |
|
77 |
List<String> search(String searchString); |
|
78 |
|
|
79 |
/** |
|
80 |
* Returns a list of codes that match the provided search string. |
|
81 |
* Examples of valid searchString: "4326", "EPSG:4326", "ESRI:4326", etc. |
|
82 |
* Depending on the implementation of the catalog, it may only search for |
|
83 |
* codes or it may search on several CRS fields (name, description, |
|
84 |
* area description, etc) |
|
85 |
* |
|
86 |
* @param searchString |
|
87 |
* @return |
|
88 |
*/ |
|
89 |
List<String> search(String authority, String searchString); |
|
90 |
|
|
91 |
/** |
|
92 |
* Gets the CRSDefinition for the provided code |
|
93 |
* @param code The CRS code (e.g. "EPSG:4326", "ESRI:4326") |
|
94 |
* |
|
95 |
* @return |
|
96 |
*/ |
|
97 |
CRSDefinition getCRSDefinition(String code); |
|
98 |
|
|
99 |
|
|
100 |
/** |
|
101 |
* Parses the provided WKT CRS definition to create a |
|
102 |
* CRSDefinition object |
|
103 |
* @param wkt The WKT CRS definition |
|
104 |
* |
|
105 |
* @return |
|
106 |
*/ |
|
107 |
CRSDefinition getCRSDefinitionFromWKT(String wkt); |
|
108 |
|
|
109 |
/** |
|
110 |
* Gets the CoordinateOperationDefinition for the provided code |
|
111 |
* @param code The operation code (e.g. "EPSG:1633", "EPSG:1632") |
|
112 |
* |
|
113 |
* @return |
|
114 |
*/ |
|
115 |
CoordinateOperationDefinition getCSDefinition(String code); |
|
116 |
|
|
117 |
/** |
|
118 |
* Register a user-defined CRS. |
|
119 |
* |
|
120 |
* @param crs an instance of the CRS to register |
|
121 |
* @param description A human-readable description of the CRS |
|
122 |
* @return The code assigned to the registered CRS on the USER |
|
123 |
* namespace |
|
124 |
*/ |
|
125 |
/* String registerCoordinateReferenceSystem(CoordinateReferenceSystem crs, String description); |
|
126 |
*/ |
|
127 |
/** |
|
128 |
* Register a user-defined CRS from an WKT definition |
|
129 |
* |
|
130 |
* @param wktDefinition The WKT definition of the CRS to register |
|
131 |
* @param description A human-readable description of the CRS |
|
132 |
* @return The code assigned to the registered CRS on the USER |
|
133 |
* namespace |
|
134 |
*/ |
|
135 |
String registerCoordinateReferenceSystem(String wktDefinition, String description); |
|
136 |
|
|
137 |
/** |
|
138 |
* Register a user-defined coordinate operation |
|
139 |
* |
|
140 |
* @param wktDefinition The WKT definition of the operation to register |
|
141 |
* @param description A human-readable description of the CRS |
|
142 |
* @return The code assigned to the registered CRS on the USER |
|
143 |
* namespace |
|
144 |
*/ |
|
145 |
String registerCoordinateOperation(String wktDefinition, String description); |
|
146 |
|
|
147 |
/** |
|
148 |
* Register a user-defined coordinate transformation using the Position |
|
149 |
* Vector Transformation method |
|
150 |
* |
|
151 |
* @param definition The WKT definition of the operation to register |
|
152 |
* @return The code assigned to the registered CRS on the USER |
|
153 |
* namespace |
|
154 |
* @see #registerCoordinateTransformationCFR(String, String, String, float, float, float, float, float, float, float) |
|
155 |
*/ |
|
156 |
String registerCoordinateTransformationPVT(String sourceCRS, String targetCRS, |
|
157 |
String description, |
|
158 |
float xTraslation, float yTraslation, float zTraslation, |
|
159 |
float xRotation, float yRotation, float zRotation, |
|
160 |
float scaleDifference); |
|
161 |
|
|
162 |
/** |
|
163 |
* Register a user-defined coordinate transformation using the Coordinate |
|
164 |
* Frame Rotation method |
|
165 |
* |
|
166 |
* @param definition The WKT definition of the operation to register |
|
167 |
* @return The code assigned to the registered CRS on the USER |
|
168 |
* namespace |
|
169 |
* @see #registerCoordinateTransformationPVT(String, String, String, float, float, float, float, float, float, float) |
|
170 |
*/ |
|
171 |
String registerCoordinateTransformationCFR(String sourceCRS, String targetCRS, |
|
172 |
String description, |
|
173 |
float xTraslation, float yTraslation, float zTraslation, |
|
174 |
float xRotation, float yRotation, float zRotation, |
|
175 |
float scaleDifference); |
|
176 |
|
|
177 |
/** |
|
178 |
* Register a user-defined coordinate transformation using a |
|
179 |
* transformation grid in NTv2 format |
|
180 |
* |
|
181 |
* @param definition The WKT definition of the operation to register |
|
182 |
* @return The code assigned to the registered CRS on the USER |
|
183 |
* namespace |
|
184 |
*/ |
|
185 |
String registerCoordinateTransformation(String sourceCRS, String targetCRS, |
|
186 |
String description, File ntv2Grid); |
|
187 |
|
|
188 |
|
|
189 |
/** |
|
190 |
* Gets the list of available CoordinatesOperations to transform or |
|
191 |
* convert coordinates from the source CoordinateReferenceSystem to |
|
192 |
* the target one. |
|
193 |
* @param source |
|
194 |
* @param target |
|
195 |
* @return |
|
196 |
*/ |
|
197 |
List<CoordinateOperationDefinition> getCoordinateOperations(CRSDefinition source, CRSDefinition target); |
|
198 |
|
|
199 |
/** |
|
200 |
* Gets the list of available CoordinatesOperations to transform or |
|
201 |
* convert coordinates from the source CoordinateReferenceSystem to |
|
202 |
* the target one. |
|
203 |
* |
|
204 |
* @param source The code of the source CRS (e.g. "ESPG:25830") |
|
205 |
* @param target The code of the target CRS (e.g. "ESPG:4230") |
|
206 |
* @return |
|
207 |
*/ |
|
208 |
List<CoordinateOperationDefinition> getCoordinateOperations(String source, String target); |
|
209 |
|
|
210 |
/** |
|
211 |
* Creates the parameters needed to initialize the manager. |
|
212 |
* |
|
213 |
* @return the initialization parameters |
|
214 |
*/ |
|
215 |
DynObject createParameters(); |
|
216 |
|
|
217 |
/** |
|
218 |
* Initializes the manager with the given parameters. |
|
219 |
* |
|
220 |
* @param parameters |
|
221 |
* to initialize the manager |
|
222 |
*/ |
|
223 |
void initialize(DynObject parameters); |
|
224 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/CoordinateReferenceSystemNotFoundException.java | ||
---|---|---|
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 |
/** |
|
27 |
* Exception thrown when there is a {@link CoordinateReferenceSystem} is not |
|
28 |
* found. |
|
29 |
* |
|
30 |
* @author gvSIG team |
|
31 |
* @version $Id$ |
|
32 |
*/ |
|
33 |
public class CoordinateReferenceSystemNotFoundException extends |
|
34 |
CRSCatalogException { |
|
35 |
|
|
36 |
private static final long serialVersionUID = -4051458353306878010L; |
|
37 |
|
|
38 |
private static final String MESSAGE = |
|
39 |
"The projection with Authority: %(authority) " |
|
40 |
+ "and Code: %(code) is not available"; |
|
41 |
|
|
42 |
private static final String KEY = "_ProjectionNotFoundException"; |
|
43 |
|
|
44 |
/** |
|
45 |
* Creates a new {@link CoordinateReferenceSystemNotFoundException}. |
|
46 |
* |
|
47 |
* @param cause |
|
48 |
* the original cause |
|
49 |
*/ |
|
50 |
public CoordinateReferenceSystemNotFoundException(String authority, |
|
51 |
String code) { |
|
52 |
super(MESSAGE, KEY, serialVersionUID); |
|
53 |
setValue("authority", authority); |
|
54 |
setValue("code", code); |
|
55 |
} |
|
56 |
|
|
57 |
/** |
|
58 |
* Creates a new {@link CoordinateReferenceSystemNotFoundException}. |
|
59 |
* |
|
60 |
* @param cause |
|
61 |
* the original cause |
|
62 |
*/ |
|
63 |
public CoordinateReferenceSystemNotFoundException(String authority, |
|
64 |
String code, Throwable cause) { |
|
65 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
66 |
setValue("authority", authority); |
|
67 |
setValue("code", code); |
|
68 |
} |
|
69 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/IdentifiedObject.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2018 gvSIG Association. |
|
5 |
* |
|
6 |
* This file has been adapted from GeoAPI, see |
|
7 |
* the original copyright headers bellow. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
22 |
* MA 02110-1301, USA. |
|
23 |
* |
|
24 |
* For any additional information, do not hesitate to contact us |
|
25 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
26 |
* |
|
27 |
* ---------- |
|
28 |
* |
|
29 |
* GeoAPI - Java interfaces for OGC/ISO standards |
|
30 |
* http://www.geoapi.org |
|
31 |
* |
|
32 |
* Copyright (C) 2004-2017 Open Geospatial Consortium, Inc. |
|
33 |
* All Rights Reserved. http://www.opengeospatial.org/ogc/legal |
|
34 |
* |
|
35 |
* Permission to use, copy, and modify this software and its documentation, with |
|
36 |
* or without modification, for any purpose and without fee or royalty is hereby |
|
37 |
* granted, provided that you include the following on ALL copies of the software |
|
38 |
* and documentation or portions thereof, including modifications, that you make: |
|
39 |
* |
|
40 |
* 1. The full text of this NOTICE in a location viewable to users of the |
|
41 |
* redistributed or derivative work. |
|
42 |
* 2. Notice of any changes or modifications to the OGC files, including the |
|
43 |
* date changes were made. |
|
44 |
* |
|
45 |
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE |
|
46 |
* NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED |
|
47 |
* TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT |
|
48 |
* THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY |
|
49 |
* PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. |
|
50 |
* |
|
51 |
* COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR |
|
52 |
* CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. |
|
53 |
* |
|
54 |
* The name and trademarks of copyright holders may NOT be used in advertising or |
|
55 |
* publicity pertaining to the software without specific, written prior permission. |
|
56 |
* Title to copyright in this software and any associated documentation will at all |
|
57 |
* times remain with copyright holders. |
|
58 |
*/ |
|
59 |
package org.gvsig.proj.catalogue; |
|
60 |
|
|
61 |
import java.util.Set; |
|
62 |
|
|
63 |
public interface IdentifiedObject { |
|
64 |
/** |
|
65 |
* An identifier which references elsewhere the object's defining information. |
|
66 |
* Alternatively an identifier by which this object can be referenced. |
|
67 |
* |
|
68 |
* @return this object identifiers, or an empty collection if there is none. |
|
69 |
*/ |
|
70 |
Set<String> getIdentifiers(); |
|
71 |
|
|
72 |
/** |
|
73 |
* Gets the identifier which was used to instantiate the object, or the |
|
74 |
* identifier that more closely matches the information used to instantiate |
|
75 |
* the object (e.g. in case of dialect differences) |
|
76 |
*/ |
|
77 |
String getIdentifier(); |
|
78 |
|
|
79 |
|
|
80 |
/** |
|
81 |
* Comments on or information about this object, including data source information. |
|
82 |
* |
|
83 |
* @return the remarks, or {@code null} if none. |
|
84 |
*/ |
|
85 |
String getRemarks(); |
|
86 |
|
|
87 |
/** |
|
88 |
* Returns a <cite>Well-Known Text</cite> (WKT) for this object. |
|
89 |
* Well-Known Texts (WKT) may come in two formats: |
|
90 |
* |
|
91 |
* <ul> |
|
92 |
* <li>The current standard, WKT 2, is defined by ISO 19162.</li> |
|
93 |
* <li>The legacy format, WKT 1, was defined by {@linkplain org.opengis.annotation.Specification#OGC_01009 OGC 01-009} |
|
94 |
* and is shown using Extended Backus Naur Form (EBNF) <a href="doc-files/WKT.html">here</a>.</li> |
|
95 |
* </ul> |
|
96 |
* |
|
97 |
* Implementations are encouraged to format according the most recent standard. |
|
98 |
* This operation may fail if unsupported or if this instance contains elements that do not have |
|
99 |
* WKT representation. |
|
100 |
* |
|
101 |
* @return the Well-Known Text (WKT) for this object. |
|
102 |
* @throws UnsupportedOperationException if this object can not be formatted as WKT. |
|
103 |
* |
|
104 |
* @departure extension |
|
105 |
* This method is not part of the OGC specification. It has been added in order to provide |
|
106 |
* the converse of the <code>CRSFactory.createFromWKT(String)</code> method, which is |
|
107 |
* defined in OGC 01-009. |
|
108 |
* |
|
109 |
* @see org.opengis.referencing.crs.CRSFactory#createFromWKT(String) |
|
110 |
*/ |
|
111 |
String toWKT() throws UnsupportedOperationException; |
|
112 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/CRSType.java | ||
---|---|---|
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 |
/** |
|
27 |
* Defines the type of CRS |
|
28 |
* |
|
29 |
* @author Cesar Martinez Izquierdo |
|
30 |
*/ |
|
31 |
public enum CRSType { |
|
32 |
/** |
|
33 |
* A 2D coordinate reference system which defines a mathematical model |
|
34 |
* to approximate the surface of an area of the earth using a planar |
|
35 |
* surface. Projected CRSs are derived from a GeographicCRS (which is |
|
36 |
* called the base CRS), because the projection formulas are applied |
|
37 |
* to the geographic coordinates to create the projected coordinates. |
|
38 |
*/ |
|
39 |
ProjectedCRSType, |
|
40 |
/** |
|
41 |
* A coordinate reference system which is defined by a coordinate conversion |
|
42 |
* from another coordinate reference system but is not a projected CRS. |
|
43 |
*/ |
|
44 |
OtherDerivedCRSType, |
|
45 |
/** |
|
46 |
* A coordinate reference system based on an ellipsoidal approximation of the |
|
47 |
* earth shape. |
|
48 |
*/ |
|
49 |
GeographicCRSType, |
|
50 |
/** |
|
51 |
* A 3D coordinate reference system with the origin at the approximate centre |
|
52 |
* of mass of the earth. A geocentric CRS deals with the earth's curvature by |
|
53 |
* taking a 3D spatial view, which obviates the need to model the earth's |
|
54 |
* curvature. |
|
55 |
*/ |
|
56 |
GeocentricCRSType, |
|
57 |
/** |
|
58 |
* A CRS which combines two or more independent coordinate reference systems, |
|
59 |
* for instance: ProjectedCRS + VerticalCRS, GeographicCRS + TemporalCRS, |
|
60 |
* etc. |
|
61 |
*/ |
|
62 |
CompoundCRSType, |
|
63 |
/** |
|
64 |
* A 1D coordinate reference system used for recording heights or depths. |
|
65 |
*/ |
|
66 |
VerticalCRSType, |
|
67 |
//ImageCRSType, #FIXME: consider ImageCRSType? PixelInCell? |
|
68 |
/** |
|
69 |
* A 1D coordinate reference system used for the recording of time. |
|
70 |
*/ |
|
71 |
TemporalCRSType, |
|
72 |
/** |
|
73 |
* A CRS that does not fall under any of the other types, or whose type |
|
74 |
* is unknown. |
|
75 |
*/ |
|
76 |
OtherCRSType; |
|
77 |
|
|
78 |
public boolean isDerived() { |
|
79 |
return (this == ProjectedCRSType) || (this == OtherDerivedCRSType); |
|
80 |
} |
|
81 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/datum/VerticalDatum.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2018 gvSIG Association. |
|
5 |
* |
|
6 |
* This file has been adapted from GeoAPI, see |
|
7 |
* the original copyright headers bellow. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
22 |
* MA 02110-1301, USA. |
|
23 |
* |
|
24 |
* For any additional information, do not hesitate to contact us |
|
25 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
26 |
* |
|
27 |
* ---------- |
|
28 |
* |
|
29 |
* GeoAPI - Java interfaces for OGC/ISO standards |
|
30 |
* http://www.geoapi.org |
|
31 |
* |
|
32 |
* Copyright (C) 2004-2017 Open Geospatial Consortium, Inc. |
|
33 |
* All Rights Reserved. http://www.opengeospatial.org/ogc/legal |
|
34 |
* |
|
35 |
* Permission to use, copy, and modify this software and its documentation, with |
|
36 |
* or without modification, for any purpose and without fee or royalty is hereby |
|
37 |
* granted, provided that you include the following on ALL copies of the software |
|
38 |
* and documentation or portions thereof, including modifications, that you make: |
|
39 |
* |
|
40 |
* 1. The full text of this NOTICE in a location viewable to users of the |
|
41 |
* redistributed or derivative work. |
|
42 |
* 2. Notice of any changes or modifications to the OGC files, including the |
|
43 |
* date changes were made. |
|
44 |
* |
|
45 |
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE |
|
46 |
* NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED |
|
47 |
* TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT |
|
48 |
* THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY |
|
49 |
* PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. |
|
50 |
* |
|
51 |
* COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR |
|
52 |
* CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. |
|
53 |
* |
|
54 |
* The name and trademarks of copyright holders may NOT be used in advertising or |
|
55 |
* publicity pertaining to the software without specific, written prior permission. |
|
56 |
* Title to copyright in this software and any associated documentation will at all |
|
57 |
* times remain with copyright holders. |
|
58 |
*/ |
|
59 |
package org.gvsig.proj.catalogue.datum; |
|
60 |
|
|
61 |
/** |
|
62 |
* A textual description and/or a set of parameters identifying a particular reference level |
|
63 |
* surface used as a zero-height surface. The description includes its position with respect |
|
64 |
* to the Earth for any of the height types recognized by this standard. |
|
65 |
* |
|
66 |
* <p>There are several types of Vertical Datums, and each may place constraints on the |
|
67 |
* {@linkplain org.opengis.referencing.cs.CoordinateSystemAxis Coordinate Axis} with which |
|
68 |
* it is combined to create a {@linkplain org.opengis.referencing.crs.VerticalCRS Vertical CRS}.</p> |
|
69 |
* |
|
70 |
* Note: gvSIG derived these interfaces from GeoAPI in order to have a simpler API and also to |
|
71 |
* avoid namespace collisions (e.g. GeoAPI 3 vs GeoTools interfaces). There is no plans |
|
72 |
* to evolve these interfaces to adapt them to future GeoAPI versions. |
|
73 |
* |
|
74 |
* @author gvSIG Team |
|
75 |
* @author Martin Desruisseaux (IRD) |
|
76 |
* @version 3.0 |
|
77 |
* @since 1.0 |
|
78 |
* |
|
79 |
* @see DatumAuthorityFactory#createVerticalDatum(String) |
|
80 |
* @see DatumFactory#createVerticalDatum(Map, VerticalDatumType) |
|
81 |
*/ |
|
82 |
public interface VerticalDatum extends Datum { |
|
83 |
|
|
84 |
/** |
|
85 |
* The type of this vertical datum. |
|
86 |
* |
|
87 |
* @departure historic |
|
88 |
* This attribute is kept conformant with the specification published in 2003. |
|
89 |
* The 2007 revision of ISO 19111 removed this attribute, since this information |
|
90 |
* can be encoded in the <cite>anchor definition</cite>. However GeoAPI keep this attribute |
|
91 |
* for historical reasons, and because it provides some of the anchor definition information |
|
92 |
* in a programmatic way more suitable to coordinate transformation engines. |
|
93 |
* |
|
94 |
* @return the type of this vertical datum. |
|
95 |
* |
|
96 |
* @see #getAnchorPoint() |
|
97 |
*/ |
|
98 |
VerticalDatumType getVerticalDatumType(); |
|
99 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/datum/EngineeringDatum.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2018 gvSIG Association. |
|
5 |
* |
|
6 |
* This file has been adapted from GeoAPI, see |
|
7 |
* the original copyright headers bellow. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
22 |
* MA 02110-1301, USA. |
|
23 |
* |
|
24 |
* For any additional information, do not hesitate to contact us |
|
25 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
26 |
* |
|
27 |
* ---------- |
|
28 |
* |
|
29 |
* GeoAPI - Java interfaces for OGC/ISO standards |
|
30 |
* http://www.geoapi.org |
|
31 |
* |
|
32 |
* Copyright (C) 2004-2017 Open Geospatial Consortium, Inc. |
|
33 |
* All Rights Reserved. http://www.opengeospatial.org/ogc/legal |
|
34 |
* |
|
35 |
* Permission to use, copy, and modify this software and its documentation, with |
|
36 |
* or without modification, for any purpose and without fee or royalty is hereby |
|
37 |
* granted, provided that you include the following on ALL copies of the software |
|
38 |
* and documentation or portions thereof, including modifications, that you make: |
|
39 |
* |
|
40 |
* 1. The full text of this NOTICE in a location viewable to users of the |
|
41 |
* redistributed or derivative work. |
|
42 |
* 2. Notice of any changes or modifications to the OGC files, including the |
|
43 |
* date changes were made. |
|
44 |
* |
|
45 |
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE |
|
46 |
* NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED |
|
47 |
* TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT |
|
48 |
* THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY |
|
49 |
* PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. |
|
50 |
* |
|
51 |
* COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR |
|
52 |
* CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. |
|
53 |
* |
|
54 |
* The name and trademarks of copyright holders may NOT be used in advertising or |
|
55 |
* publicity pertaining to the software without specific, written prior permission. |
|
56 |
* Title to copyright in this software and any associated documentation will at all |
|
57 |
* times remain with copyright holders. |
|
58 |
*/ |
|
59 |
package org.gvsig.proj.catalogue.datum; |
|
60 |
|
|
61 |
/** |
|
62 |
* Defines the origin of an engineering coordinate reference system. An engineering datum is used |
|
63 |
* in a region around that origin. This origin can be fixed with respect to the earth (such as a |
|
64 |
* defined point at a construction site), or be a defined point on a moving vehicle (such as on a |
|
65 |
* ship or satellite). |
|
66 |
* |
|
67 |
* Note: gvSIG derived these interfaces from GeoAPI in order to have a simpler API and also to |
|
68 |
* avoid namespace collisions (e.g. GeoAPI 3 vs GeoTools interfaces). There is no plans |
|
69 |
* to evolve these interfaces to adapt them to future GeoAPI versions. |
|
70 |
* |
|
71 |
* @author gvSIG Team |
|
72 |
* @author Martin Desruisseaux (IRD) |
|
73 |
* @version 3.0 |
|
74 |
* @since 1.0 |
|
75 |
* |
|
76 |
* @see DatumAuthorityFactory#createEngineeringDatum(String) |
|
77 |
* @see DatumFactory#createEngineeringDatum(Map) |
|
78 |
*/ |
|
79 |
public interface EngineeringDatum extends Datum { |
|
80 |
|
|
81 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/datum/GeodeticDatum.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2018 gvSIG Association. |
|
5 |
* |
|
6 |
* This file has been adapted from GeoAPI, see |
|
7 |
* the original copyright headers bellow. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
22 |
* MA 02110-1301, USA. |
|
23 |
* |
|
24 |
* For any additional information, do not hesitate to contact us |
|
25 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
26 |
* |
|
27 |
* ---------- |
|
28 |
* |
|
29 |
* GeoAPI - Java interfaces for OGC/ISO standards |
|
30 |
* http://www.geoapi.org |
|
31 |
* |
|
32 |
* Copyright (C) 2004-2017 Open Geospatial Consortium, Inc. |
|
33 |
* All Rights Reserved. http://www.opengeospatial.org/ogc/legal |
|
34 |
* |
|
35 |
* Permission to use, copy, and modify this software and its documentation, with |
|
36 |
* or without modification, for any purpose and without fee or royalty is hereby |
|
37 |
* granted, provided that you include the following on ALL copies of the software |
|
38 |
* and documentation or portions thereof, including modifications, that you make: |
|
39 |
* |
|
40 |
* 1. The full text of this NOTICE in a location viewable to users of the |
|
41 |
* redistributed or derivative work. |
|
42 |
* 2. Notice of any changes or modifications to the OGC files, including the |
|
43 |
* date changes were made. |
|
44 |
* |
|
45 |
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE |
|
46 |
* NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED |
|
47 |
* TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT |
|
48 |
* THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY |
|
49 |
* PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. |
|
50 |
* |
|
51 |
* COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR |
|
52 |
* CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. |
|
53 |
* |
|
54 |
* The name and trademarks of copyright holders may NOT be used in advertising or |
|
55 |
* publicity pertaining to the software without specific, written prior permission. |
|
56 |
* Title to copyright in this software and any associated documentation will at all |
|
57 |
* times remain with copyright holders. |
|
58 |
*/ |
|
59 |
package org.gvsig.proj.catalogue.datum; |
|
60 |
|
|
61 |
/** |
|
62 |
* Defines the location and precise orientation in 3-dimensional space of a defined ellipsoid |
|
63 |
* (or sphere) that approximates the shape of the earth. Used also for Cartesian coordinate |
|
64 |
* system centered in this ellipsoid (or sphere). |
|
65 |
* |
|
66 |
* Note: gvSIG derived these interfaces from GeoAPI in order to have a simpler API and also to |
|
67 |
* avoid namespace collisions (e.g. GeoAPI 3 vs GeoTools interfaces). There is no plans |
|
68 |
* to evolve these interfaces to adapt them to future GeoAPI versions. |
|
69 |
* |
|
70 |
* @author gvSIG Team |
|
71 |
* @author Martin Desruisseaux (IRD) |
|
72 |
* @version 3.0 |
|
73 |
* @since 1.0 |
|
74 |
* |
|
75 |
* @see Ellipsoid |
|
76 |
* @see PrimeMeridian |
|
77 |
* |
|
78 |
* @see DatumAuthorityFactory#createGeodeticDatum(String) |
|
79 |
* @see DatumFactory#createGeodeticDatum(Map, Ellipsoid, PrimeMeridian) |
|
80 |
*/ |
|
81 |
public interface GeodeticDatum extends Datum { |
|
82 |
/** |
|
83 |
* Returns the ellipsoid. |
|
84 |
* |
|
85 |
* @return the ellipsoid. |
|
86 |
*/ |
|
87 |
Ellipsoid getEllipsoid(); |
|
88 |
|
|
89 |
/** |
|
90 |
* Returns the prime meridian. |
|
91 |
* |
|
92 |
* @return the prime meridian. |
|
93 |
*/ |
|
94 |
PrimeMeridian getPrimeMeridian(); |
|
95 |
|
|
96 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/datum/Ellipsoid.java | ||
---|---|---|
81 | 81 |
* A number of global best-fit ellipsoids are now available. An association of an ellipsoid with |
82 | 82 |
* the earth is made through the definition of the size and shape of the ellipsoid and the position |
83 | 83 |
* and orientation of this ellipsoid with respect to the earth. Collectively this choice is captured |
84 |
* by the concept of "{@linkplain GeodeticDatum geodetic datum}". A change of size, shape, position
|
|
84 |
* by the concept of "geodetic datum". A change of size, shape, position
|
|
85 | 85 |
* or orientation of an ellipsoid will result in a change of geographic coordinates of a point and |
86 | 86 |
* be described as a different geodetic datum. Conversely geographic coordinates are unambiguous |
87 | 87 |
* only when associated with a geodetic datum. |
88 |
* |
|
89 |
* @departure constraint |
|
90 |
* ISO 19111 defines the union named <code>secondDefiningParameter</code> |
|
91 |
* as being either <code>semiMinorAxis</code> or <code>inverseFlattening</code>. |
|
92 |
* The <code>union</code> construct (defined in some languages like C/C++) does not exist in Java. |
|
93 |
* GeoAPI changed the interface to require both ellipsoidal parameters (in addition to the <code>semiMajorAxis</code> |
|
94 |
* parameter which is mandatory in any case), as was done in <a href="http://www.opengeospatial.org/standards/ct">OGC 01-009</a>. |
|
95 |
* However, implementors could readily permit users to only provide one of the two parameters |
|
96 |
* by creating a class which calculates the second parameter from the first. |
|
97 |
* For precision, GeoAPI imports the <code>isIvfDefinitive</code> attribute from OGC 01-009 |
|
98 |
* to enable the user to establish which of the two parameters was used to define the instance. |
|
99 | 88 |
* |
100 | 89 |
* Note: gvSIG derived these interfaces from GeoAPI in order to have a simpler API and also to |
101 | 90 |
* avoid namespace collisions (e.g. GeoAPI 3 vs GeoTools interfaces). There is no plans |
... | ... | |
103 | 92 |
* |
104 | 93 |
* @author gvSIG Team |
105 | 94 |
* @author Martin Desruisseaux (IRD) |
106 |
* @version 3.0.1 |
|
107 |
* @since 1.0 |
|
108 |
* |
|
109 |
* @see DatumAuthorityFactory#createEllipsoid(String) |
|
110 |
* @see DatumFactory#createEllipsoid(Map, double, double, Unit) |
|
111 |
* @see DatumFactory#createFlattenedSphere(Map, double, double, Unit) |
|
112 | 95 |
*/ |
113 | 96 |
public interface Ellipsoid { |
114 | 97 |
/** |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/datum/PrimeMeridian.java | ||
---|---|---|
64 | 64 |
/** |
65 | 65 |
* A prime meridian defines the origin from which longitude values are determined. |
66 | 66 |
* Most geodetic datums use Greenwich as their prime meridian. |
67 |
* |
|
68 |
* <p>Constraints:</p> |
|
69 |
* <ul> |
|
70 |
* <li>If the prime meridian {@linkplain #getName() name} is "Greenwich" then the value of |
|
71 |
* {@linkplain #getGreenwichLongitude() Greenwich longitude} shall be 0 degrees.</li> |
|
72 |
* <li>Conversely if the Greenwich longitude value is zero, then the prime meridian name |
|
73 |
* shall be "Greenwich".</li> |
|
74 |
* </ul> |
|
75 | 67 |
* |
76 | 68 |
* Note: gvSIG derived these interfaces from GeoAPI in order to have a simpler API and also to |
77 | 69 |
* avoid namespace collisions (e.g. GeoAPI 3 vs GeoTools interfaces). There is no plans |
... | ... | |
79 | 71 |
* |
80 | 72 |
* @author gvSIG Team |
81 | 73 |
* @author Martin Desruisseaux (IRD) |
82 |
* @version 3.0.1 |
|
83 |
* @since 1.0 |
|
84 |
* |
|
85 |
* @see DatumAuthorityFactory#createPrimeMeridian(String) |
|
86 |
* @see DatumFactory#createPrimeMeridian(Map, double, Unit) |
|
87 | 74 |
*/ |
88 | 75 |
public interface PrimeMeridian { |
89 | 76 |
/** |
77 |
* A common name for this primer meridian |
|
78 |
* |
|
79 |
* @return the name, or {@code null} if none. |
|
80 |
*/ |
|
81 |
String getName(); |
|
82 |
|
|
83 |
/** |
|
90 | 84 |
* Longitude of the prime meridian measured from the Greenwich meridian, positive eastward. |
91 | 85 |
* The {@code greenwichLongitude} default value is zero, and that value shall be used |
92 | 86 |
* when the {@linkplain #getName() meridian name} value is "Greenwich". |
... | ... | |
98 | 92 |
|
99 | 93 |
/** |
100 | 94 |
* Returns the angular unit of the {@linkplain #getGreenwichLongitude() Greenwich longitude}. |
101 |
* |
|
102 |
* @departure historic |
|
103 |
* This attribute is inherited from an older OGC specification. |
|
104 |
* In ISO 19111, <code>greenwichLongitude</code> is a property of type <code>Angle</code> |
|
105 |
* rather than <code>double</code>, and the unit of measure is part of the <code>Angle</code> value. |
|
106 |
* |
|
95 |
* |
|
107 | 96 |
* @return the angular unit of Greenwich longitude. |
108 | 97 |
*/ |
109 | 98 |
Unit<Angle> getAngularUnit(); |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/datum/Datum.java | ||
---|---|---|
60 | 60 |
|
61 | 61 |
import java.util.Date; |
62 | 62 |
|
63 |
import org.gvsig.proj.catalogue.IdentifiedObject; |
|
64 |
import org.gvsig.proj.catalogue.ref.Extent; |
|
65 |
|
|
66 | 63 |
/** |
67 |
* Specifies the relationship of a {@linkplain org.opengis.referencing.cs.CoordinateSystem coordinate system} |
|
68 |
* to the earth, thus creating a {@linkplain org.opengis.referencing.crs.CoordinateReferenceSystem coordinate |
|
69 |
* reference system}. For {@linkplain org.opengis.referencing.crs.GeocentricCRS geodetic} and |
|
70 |
* {@linkplain org.opengis.referencing.crs.VerticalCRS vertical} coordinate reference systems, |
|
71 |
* the datum relates the coordinate system to the Earth. With other types of coordinate reference systems, |
|
64 |
* Specifies the relationship of a coordinate system to the earth, thus creating a coordinate |
|
65 |
* reference system. For geodetic and vertical coordinate reference systems, the datum relates |
|
66 |
* the coordinate system to the Earth. With other types of coordinate reference systems, |
|
72 | 67 |
* the datum may relate the coordinate system to another physical or virtual object. |
73 | 68 |
* |
74 | 69 |
* <p>A datum uses a parameter or set of parameters that determine the location of the origin of the |
75 |
* coordinate reference system. Each datum subtype can be associated with only specific types of |
|
76 |
* {@linkplain org.opengis.referencing.cs.CoordinateSystem coordinate systems}, documented in their |
|
77 |
* javadoc.</p> |
|
70 |
* coordinate reference system.</p> |
|
78 | 71 |
* |
79 | 72 |
* Note: gvSIG derived these interfaces from GeoAPI in order to have a simpler API and also to |
80 | 73 |
* avoid namespace collisions (e.g. GeoAPI 3 vs GeoTools interfaces). There is no plans |
... | ... | |
82 | 75 |
* |
83 | 76 |
* @author gvSIG Team |
84 | 77 |
* @author Martin Desruisseaux (IRD) |
85 |
* @version 3.1 |
|
86 |
* @since 1.0 |
|
87 | 78 |
* |
88 | 79 |
* @see org.opengis.referencing.cs.CoordinateSystem |
89 | 80 |
* @see org.opengis.referencing.crs.CoordinateReferenceSystem |
90 | 81 |
*/ |
91 |
public interface Datum extends IdentifiedObject {
|
|
82 |
public interface Datum { |
|
92 | 83 |
/** |
84 |
* A common name for this datum |
|
85 |
* |
|
86 |
* @return the name, or {@code null} if none. |
|
87 |
*/ |
|
88 |
String getName(); |
|
89 |
|
|
90 |
|
|
91 |
/** |
|
92 |
* Gets a code that references an unambiguous definition of the datum for |
|
93 |
* some authority. Examples: "EPSG:6326", "EPSG:6258". |
|
94 |
* |
|
95 |
* @return the datum identifier or null if not available |
|
96 |
*/ |
|
97 |
String getIdentifier(); |
|
98 |
|
|
99 |
/** |
|
93 | 100 |
* A description, possibly including coordinates of an identified point or points, of the |
94 | 101 |
* relationship used to anchor the coordinate system to the Earth or alternate object. |
95 | 102 |
* Also known as the "origin", especially for Engineering and Image Datums. |
96 | 103 |
* |
97 | 104 |
* <ul> |
98 |
* <li>For a {@link GeodeticDatum}, this anchor may be a point known as the fundamental point,
|
|
105 |
* <li>For a GeodeticDatum, this anchor may be a point known as the fundamental point,
|
|
99 | 106 |
* which is traditionally the point where the relationship between geoid and ellipsoid is defined, |
100 | 107 |
* together with a direction from that point. In other cases, the anchor may consist of a |
101 | 108 |
* number of points. In those cases, the parameters defining the geoid/ellipsoid relationship |
102 | 109 |
* have then been averaged for these points, and the coordinates of the points adopted as the |
103 | 110 |
* datum definition.</li> |
104 | 111 |
* |
105 |
* <li>For an {@link EngineeringDatum}, the anchor may be an identified physical point with the
|
|
112 |
* <li>For an EngineeringDatum, the anchor may be an identified physical point with the
|
|
106 | 113 |
* orientation defined relative to the object.</li> |
107 | 114 |
* |
108 |
* <li>For an {@link ImageDatum}, the anchor point is usually either the centre of the image or the
|
|
115 |
* <li>For an ImageDatum, the anchor point is usually either the centre of the image or the
|
|
109 | 116 |
* corner of the image. The coordinate system orientation is defined through the |
110 | 117 |
* {@link org.opengis.referencing.cs.AxisDirection} class.</li> |
111 | 118 |
* |
112 |
* <li>For a {@link TemporalDatum}, this attribute is not defined. Instead of the anchor point,
|
|
119 |
* <li>For a TemporalDatum, this attribute is not defined. Instead of the anchor point,
|
|
113 | 120 |
* a temporal datum carries a separate {@linkplain TemporalDatum#getOrigin() time origin} |
114 | 121 |
* of type {@link Date}.</li> |
115 | 122 |
* </ul> |
116 | 123 |
* |
117 |
* @departure historic |
|
118 |
* This method has been kept conformant with the specification published in 2003 for compatibility reasons. |
|
119 |
* The revision published in 2007 renamed this property as <code>anchorDefinition</code>. |
|
120 |
* |
|
121 | 124 |
* @return a description of the anchor point, or {@code null} if none. |
122 |
* |
|
123 |
* @see VerticalDatum#getVerticalDatumType() |
|
124 | 125 |
*/ |
125 | 126 |
String getAnchorPoint(); |
126 | 127 |
|
... | ... | |
134 | 135 |
* Alternatively, a datum may be superseded by a later datum, in which case the realization epoch |
135 | 136 |
* for the new datum defines the upper limit for the validity of the superseded datum.</p> |
136 | 137 |
* |
137 |
* <div class="warning"><b>Upcoming API change - temporal schema</b><br> |
|
138 |
* The return type of this method may change in GeoAPI 4.0 release. It may be replaced by a |
|
139 |
* type matching more closely either ISO 19108 (<cite>Temporal Schema</cite>) or ISO 19103. |
|
140 |
* </div> |
|
141 |
* |
|
142 | 138 |
* @return the datum realization epoch, or {@code null} if not available. |
143 | 139 |
*/ |
144 | 140 |
Date getRealizationEpoch(); |
145 |
|
|
141 |
|
|
146 | 142 |
/** |
147 |
* Area or region or timeframe in which this datum is valid.
|
|
143 |
* If the datum is a geodetic datum, it returns the ellipsoid
|
|
148 | 144 |
* |
149 |
* @return the datum valid domain, or {@code null} if not available. |
|
150 |
* |
|
151 |
* @since 2.1 |
|
145 |
* @return the ellipsoid or null if the datum does not have an ellipsoid |
|
152 | 146 |
*/ |
153 |
Extent getDomainOfValidity();
|
|
147 |
Ellipsoid getEllipsoid();
|
|
154 | 148 |
|
155 | 149 |
/** |
156 |
* Description of domain of usage, or limitations of usage, for which this datum object is valid.
|
|
150 |
* If the datum is a geodetic datum, returns the prime meridian.
|
|
157 | 151 |
* |
158 |
* @return a description of domain of usage, or {@code null} if none. |
|
152 |
* @return the prime meridian, or null if the datum does not have a prime |
|
153 |
* meridian |
|
154 |
*/ |
|
155 |
PrimeMeridian getPrimeMeridian(); |
|
156 |
|
|
157 |
/** |
|
158 |
* Whether this datum is a geodetic datum. A geodetic datum defines an ellipsoid and |
|
159 |
* the location and precise orientation in 3-dimensional space of this ellipsoid in |
|
160 |
* relation to the Earth. |
|
161 |
* |
|
162 |
* @return true if the datum is geodetic, false otherwise |
|
163 |
*/ |
|
164 |
boolean isGeodetic(); |
|
165 |
|
|
166 |
/** |
|
167 |
* Whether this datum is a vertical datum |
|
168 |
* |
|
169 |
* @return true if this is a vertical datum, false otherwise |
|
170 |
*/ |
|
171 |
boolean isVertical(); |
|
172 |
|
|
173 |
/** |
|
174 |
* The type of the vertical datum. |
|
159 | 175 |
* |
160 |
* @departure historic |
|
161 |
* This method has been kept conformant with the specification published in 2003. The revision |
|
162 |
* published in 2007 replaced the singleton by a collection and changed the obligation |
|
163 |
* from "optional" to "mandatory", requiring a return value of <cite>"not known"</cite> |
|
164 |
* if the scope is unknown. |
|
176 |
* @return the type of the vertical datum, or null if this datum is not a |
|
177 |
* vertical datum |
|
178 |
* |
|
179 |
* @see #getAnchorPoint() |
|
165 | 180 |
*/ |
166 |
String getScope();
|
|
181 |
VerticalDatumType getVerticalDatumType();
|
|
167 | 182 |
|
168 | 183 |
} |
org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalogue/ref/Extent.java | ||
---|---|---|
75 | 75 |
* |
76 | 76 |
* @author gvSIG Team |
77 | 77 |
* @author Martin Desruisseaux (IRD) |
78 |
* @version 3.1 |
|
79 |
* @since 1.0 |
|
80 | 78 |
*/ |
81 | 79 |
public interface Extent { |
82 | 80 |
/** |
83 | 81 |
* The spatial and temporal extent for the referring object. |
84 | 82 |
* |
85 | 83 |
* @return the spatial and temporal extent, or {@code null} in none. |
86 |
* |
|
87 |
* @condition Mandatory if {@linkplain #getGeographicElements() geographic element}, |
|
88 |
* {@linkplain #getVerticalElements() vertical element} and |
|
89 |
* {@linkplain #getTemporalElements() temporal element} are not provided. |
|
90 | 84 |
*/ |
91 | 85 |
String getDescription(); |
Also available in: Unified diff