source: osm/applications/editors/josm/plugins/opendata/includes/org/opengis/referencing/crs/CRSFactory.java@ 28000

Last change on this file since 28000 was 28000, checked in by donvip, 12 years ago

Import new "opendata" JOSM plugin

File size: 12.0 KB
Line 
1/*
2 * GeoTools - The Open Source Java GIS Toolkit
3 * http://geotools.org
4 *
5 * (C) 2011, Open Source Geospatial Foundation (OSGeo)
6 * (C) 2003-2005, Open Geospatial Consortium Inc.
7 *
8 * All Rights Reserved. http://www.opengis.org/legal/
9 */
10package org.opengis.referencing.crs;
11
12import java.util.Map;
13import org.opengis.referencing.cs.*;
14import org.opengis.referencing.datum.*;
15import org.opengis.referencing.operation.*;
16import org.opengis.referencing.ObjectFactory;
17import org.opengis.referencing.FactoryException;
18import org.opengis.annotation.UML;
19
20import static org.opengis.annotation.Specification.*;
21
22
23/**
24 * Builds up complex {@linkplain CoordinateReferenceSystem coordinate reference systems}
25 * from simpler objects or values. {@code CRSFactory} allows applications to make
26 * {@linkplain CoordinateReferenceSystem coordinate reference systems} that cannot be
27 * created by a {@link CRSAuthorityFactory}. This factory is very flexible, whereas the
28 * authority factory is easier to use.
29 *
30 * So {@link CRSAuthorityFactory} can be used to make "standard" coordinate reference systems,
31 * and {@code CRSFactory} can be used to make "special" coordinate reference systems.
32 *
33 * For example, the EPSG authority has codes for USA state plane coordinate systems
34 * using the NAD83 datum, but these coordinate systems always use meters. EPSG does
35 * not have codes for NAD83 state plane coordinate systems that use feet units. This
36 * factory lets an application create such a hybrid coordinate system.
37 *
38 *
39 * @source $URL: http://svn.osgeo.org/geotools/branches/2.7.x/modules/library/opengis/src/main/java/org/opengis/referencing/crs/CRSFactory.java $
40 * @version <A HREF="http://www.opengis.org/docs/01-009.pdf">Implementation specification 1.0</A>
41 * @author Martin Desruisseaux (IRD)
42 * @since GeoAPI 1.0
43 *
44 * @see org.opengis.referencing.cs.CSFactory
45 * @see org.opengis.referencing.datum.DatumFactory
46 */
47@UML(identifier="CS_CoordinateSystemFactory", specification=OGC_01009)
48public interface CRSFactory extends ObjectFactory {
49 /**
50 * Creates a compound coordinate reference system from an ordered
51 * list of {@code CoordinateReferenceSystem} objects.
52 *
53 * @param properties Name and other properties to give to the new object.
54 * Available properties are {@linkplain ObjectFactory listed there}.
55 * @param elements ordered array of {@code CoordinateReferenceSystem} objects.
56 * @return The coordinate reference system for the given properties.
57 * @throws FactoryException if the object creation failed.
58 */
59 @UML(identifier="createCompoundCoordinateSystem", specification=OGC_01009)
60 CompoundCRS createCompoundCRS(Map<String, ?> properties,
61 CoordinateReferenceSystem[] elements) throws FactoryException;
62
63 /**
64 * Creates a engineering coordinate reference system.
65 *
66 * @param properties Name and other properties to give to the new object.
67 * Available properties are {@linkplain ObjectFactory listed there}.
68 * @param datum Engineering datum to use in created CRS.
69 * @param cs The coordinate system for the created CRS.
70 * @return The coordinate reference system for the given properties.
71 * @throws FactoryException if the object creation failed.
72 */
73 @UML(identifier="createLocalCoordinateSystem", specification=OGC_01009)
74 EngineeringCRS createEngineeringCRS(Map<String, ?> properties,
75 EngineeringDatum datum,
76 CoordinateSystem cs) throws FactoryException;
77
78 /**
79 * Creates a vertical coordinate reference system.
80 *
81 * @param properties Name and other properties to give to the new object.
82 * Available properties are {@linkplain ObjectFactory listed there}.
83 * @param datum Vertical datum to use in created CRS.
84 * @param cs The Vertical coordinate system for the created CRS.
85 * @return The coordinate reference system for the given properties.
86 * @throws FactoryException if the object creation failed.
87 */
88 @UML(identifier="createVerticalCoordinateSystem", specification=OGC_01009)
89 VerticalCRS createVerticalCRS(Map<String, ?> properties,
90 VerticalDatum datum,
91 VerticalCS cs) throws FactoryException;
92
93 /**
94 * Creates a geocentric coordinate reference system from a {@linkplain CartesianCS
95 * cartesian coordinate system}.
96 *
97 * @param properties Name and other properties to give to the new object.
98 * Available properties are {@linkplain ObjectFactory listed there}.
99 * @param datum Geodetic datum to use in created CRS.
100 * @param cs The cartesian coordinate system for the created CRS.
101 * @return The coordinate reference system for the given properties.
102 * @throws FactoryException if the object creation failed.
103 */
104 GeocentricCRS createGeocentricCRS(Map<String, ?> properties,
105 GeodeticDatum datum,
106 CartesianCS cs) throws FactoryException;
107
108 /**
109 * Creates a geographic coordinate reference system.
110 * It could be <var>Latitude</var>/<var>Longitude</var> or
111 * <var>Longitude</var>/<var>Latitude</var>.
112 *
113 * @param properties Name and other properties to give to the new object.
114 * Available properties are {@linkplain ObjectFactory listed there}.
115 * @param datum Geodetic datum to use in created CRS.
116 * @param cs The ellipsoidal coordinate system for the created CRS.
117 * @return The coordinate reference system for the given properties.
118 * @throws FactoryException if the object creation failed.
119 */
120 @UML(identifier="createGeographicCoordinateSystem", specification=OGC_01009)
121 GeographicCRS createGeographicCRS(Map<String, ?> properties,
122 GeodeticDatum datum,
123 EllipsoidalCS cs) throws FactoryException;
124
125 /**
126 * Creates a derived coordinate reference system. If the transform is an affine
127 * map performing a rotation, then any mixed axes must have identical units.
128 * For example, a (<var>lat_deg</var>, <var>lon_deg</var>, <var>height_feet</var>)
129 * system can be rotated in the (<var>lat</var>, <var>lon</var>) plane, since both
130 * affected axes are in degrees. But the transform should not rotate this coordinate
131 * system in any other plane.
132 * <p>
133 * The {@code conversionFromBase} shall contains the {@linkplain Conversion#getParameterValues
134 * parameter values} required for the conversion. It may or may not contain the corresponding
135 * "{@linkplain Conversion#getMathTransform base to derived}" transform, at user's choice. If
136 * a transform is provided, this method may or may not use it at implementation choice.
137 * Otherwise it shall creates the transform from the parameters.
138 * <p>
139 * It is the user's responsability to ensure that the conversion performs all required steps,
140 * including unit conversions and change of axis order, if needed. Note that this behavior is
141 * different than {@link #createProjectedCRS createProjectedCRS} because transforms other than
142 * <cite>cartographic projections</cite> are not standardized.
143 *
144 * @param properties Name and other properties to give to the new object.
145 * Available properties are {@linkplain ObjectFactory listed there}.
146 * @param baseCRS Coordinate reference system to base the projection on. The number of axes
147 * must matches the {@linkplain OperationMethod#getSourceDimensions source dimensions}
148 * of the conversion from base.
149 * @param conversionFromBase The
150 * {@linkplain CoordinateOperationFactory#createDefiningConversion defining conversion}.
151 * @param derivedCS The coordinate system for the derived CRS. The number of axes must matches
152 * the {@linkplain OperationMethod#getTargetDimensions target dimensions} of the conversion
153 * from base.
154 * @return The coordinate reference system for the given properties.
155 * @throws FactoryException if the object creation failed.
156 *
157 * @see CoordinateOperationFactory#createDefiningConversion
158 * @see MathTransformFactory#createBaseToDerived
159 *
160 * @since GeoAPI 2.1
161 */
162 @UML(identifier="createFittedCoordinateSystem", specification=OGC_01009)
163 DerivedCRS createDerivedCRS(Map<String,?> properties,
164 CoordinateReferenceSystem baseCRS,
165 Conversion conversionFromBase,
166 CoordinateSystem derivedCS) throws FactoryException;
167
168 /**
169 * Creates a projected coordinate reference system from a defining conversion.
170 * The {@code conversionFromBase} shall contains the {@linkplain Conversion#getParameterValues
171 * parameter values} required for the projection. It may or may not contain the corresponding
172 * "{@linkplain Conversion#getMathTransform base to derived}" transform, at user's choice. If
173 * a transform is provided, this method may or may not use it at implementation choice.
174 * Otherwise it shall creates the transform from the parameters.
175 * <p>
176 * The supplied conversion should <strong>not</strong> includes the operation steps for
177 * performing {@linkplain CoordinateSystemAxis#getUnit unit} conversions and change of
178 * {@linkplain CoordinateSystem#getAxis axis} order; those operations shall be inferred
179 * by this constructor by some code equivalent to:
180 *
181 * <blockquote><code>
182 * MathTransform baseToDerived = {@linkplain MathTransformFactory#createBaseToDerived
183 * MathTransformFactory.createBaseToDerived}(baseCRS, parameters, derivedCS)
184 * </code></blockquote>
185 *
186 * This behavior is different than {@link #createDerivedCRS createDerivedCRS} because
187 * parameterized transforms are standardized for projections. See the {@linkplain
188 * MathTransformFactory#createParameterizedTransform note on cartographic projections}.
189 *
190 * @param properties Name and other properties to give to the new object.
191 * Available properties are {@linkplain ObjectFactory listed there}.
192 * @param baseCRS Geographic coordinate reference system to base the projection on. The number
193 * of axes must matches the {@linkplain OperationMethod#getSourceDimensions source dimensions}
194 * of the conversion from base.
195 * @param conversionFromBase The
196 * {@linkplain CoordinateOperationFactory#createDefiningConversion defining conversion}.
197 * @param derivedCS The coordinate system for the projected CRS. The number of axes must matches
198 * the {@linkplain OperationMethod#getTargetDimensions target dimensions} of the conversion
199 * from base.
200 * @return The coordinate reference system for the given properties.
201 * @throws FactoryException if the object creation failed.
202 *
203 * @see CoordinateOperationFactory#createDefiningConversion
204 * @see MathTransformFactory#createBaseToDerived
205 *
206 * @since GeoAPI 2.1
207 */
208 @UML(identifier="createProjectedCoordinateSystem", specification=OGC_01009)
209 ProjectedCRS createProjectedCRS(Map<String,?> properties,
210 GeographicCRS baseCRS,
211 Conversion conversionFromBase,
212 CartesianCS derivedCS) throws FactoryException;
213
214 /**
215 * Creates a coordinate reference system object from a string.
216 * The <A HREF="../doc-files/WKT.html">definition for WKT</A>
217 * is shown using Extended Backus Naur Form (EBNF).
218 *
219 * @param wkt Coordinate system encoded in Well-Known Text format.
220 * @return The coordinate reference system for the given WKT.
221 * @throws FactoryException if the object creation failed.
222 */
223 @UML(identifier="createFromWKT", specification=OGC_01009)
224 CoordinateReferenceSystem createFromWKT(String wkt) throws FactoryException;
225}
Note: See TracBrowser for help on using the repository browser.