001 /*
002 * GeoAPI - Java interfaces for OGC/ISO standards
003 * http://www.geoapi.org
004 *
005 * Copyright (C) 2004-2012 Open Geospatial Consortium, Inc.
006 * All Rights Reserved. http://www.opengeospatial.org/ogc/legal
007 *
008 * Permission to use, copy, and modify this software and its documentation, with
009 * or without modification, for any purpose and without fee or royalty is hereby
010 * granted, provided that you include the following on ALL copies of the software
011 * and documentation or portions thereof, including modifications, that you make:
012 *
013 * 1. The full text of this NOTICE in a location viewable to users of the
014 * redistributed or derivative work.
015 * 2. Notice of any changes or modifications to the OGC files, including the
016 * date changes were made.
017 *
018 * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
019 * NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020 * TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
021 * THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
022 * PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
023 *
024 * COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
025 * CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
026 *
027 * The name and trademarks of copyright holders may NOT be used in advertising or
028 * publicity pertaining to the software without specific, written prior permission.
029 * Title to copyright in this software and any associated documentation will at all
030 * times remain with copyright holders.
031 */
032 package org.opengis.referencing.crs;
033
034 import org.opengis.referencing.AuthorityFactory;
035 import org.opengis.referencing.NoSuchAuthorityCodeException;
036 import org.opengis.util.FactoryException;
037 import org.opengis.annotation.UML;
038
039 import static org.opengis.annotation.Specification.*;
040
041
042 /**
043 * Creates {@linkplain CoordinateReferenceSystem coordinate reference systems} using authority codes. External authorities
044 * are used to manage definitions of objects used in this interface. The definitions of these objects are
045 * referenced using code strings. A commonly used authority is <A HREF="http://www.epsg.org">EPSG</A>,
046 * which is also used in the <A HREF="http://www.remotesensing.org/geotiff/geotiff.html">GeoTIFF</A>
047 * standard.
048 *
049 * @author Martin Desruisseaux (IRD)
050 * @version 3.0
051 * @since 1.0
052 *
053 * @see org.opengis.referencing.cs.CSAuthorityFactory
054 * @see org.opengis.referencing.datum.DatumAuthorityFactory
055 */
056 @UML(identifier="CS_CoordinateSystemAuthorityFactory", specification=OGC_01009)
057 public interface CRSAuthorityFactory extends AuthorityFactory {
058 /**
059 * Returns an arbitrary {@linkplain CoordinateReferenceSystem coordinate reference system} from a code. If the
060 * coordinate reference system type is know at compile time, it is recommended to invoke the most precise method
061 * instead of this one (for example
062 * <code> {@linkplain #createGeographicCRS createGeographicCRS}(code) </code>
063 * instead of <code> createCoordinateReferenceSystem(code) </code> if the caller
064 * know he is asking for a {@linkplain GeographicCRS geographic coordinate reference system}).
065 *
066 * @param code Value allocated by authority.
067 * @return The coordinate reference system for the given code.
068 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
069 * @throws FactoryException if the object creation failed for some other reason.
070 *
071 * @see #createGeographicCRS(String)
072 * @see #createProjectedCRS(String)
073 * @see #createVerticalCRS(String)
074 * @see #createTemporalCRS(String)
075 * @see #createCompoundCRS(String)
076 */
077 @UML(identifier="createHorizontalCoordinateSystem", specification=OGC_01009)
078 CoordinateReferenceSystem createCoordinateReferenceSystem(String code)
079 throws NoSuchAuthorityCodeException, FactoryException;
080
081 /**
082 * Creates a 3D coordinate reference system from a code.
083 *
084 * @param code Value allocated by authority.
085 * @return The coordinate reference system for the given code.
086 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
087 * @throws FactoryException if the object creation failed for some other reason.
088 */
089 @UML(identifier="createCompoundCoordinateSystem", specification=OGC_01009)
090 CompoundCRS createCompoundCRS(String code)
091 throws NoSuchAuthorityCodeException, FactoryException;
092
093 /**
094 * Creates a derived coordinate reference system from a code.
095 *
096 * @param code Value allocated by authority.
097 * @return The coordinate reference system for the given code.
098 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
099 * @throws FactoryException if the object creation failed for some other reason.
100 */
101 DerivedCRS createDerivedCRS(String code)
102 throws NoSuchAuthorityCodeException, FactoryException;
103
104 /**
105 * Create a {@linkplain EngineeringCRS engineering coordinate reference system} from a code.
106 *
107 * @param code Value allocated by authority.
108 * @return The coordinate reference system for the given code.
109 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
110 * @throws FactoryException if the object creation failed for some other reason.
111 */
112 EngineeringCRS createEngineeringCRS(String code)
113 throws NoSuchAuthorityCodeException, FactoryException;
114
115 /**
116 * Returns a {@linkplain GeographicCRS geographic coordinate reference system} from a code.
117 *
118 * @param code Value allocated by authority.
119 * @return The coordinate reference system for the given code.
120 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
121 * @throws FactoryException if the object creation failed for some other reason.
122 *
123 * @see org.opengis.referencing.datum.DatumAuthorityFactory#createGeodeticDatum
124 */
125 @UML(identifier="createGeographicCoordinateSystem", specification=OGC_01009)
126 GeographicCRS createGeographicCRS(String code)
127 throws NoSuchAuthorityCodeException, FactoryException;
128
129 /**
130 * Returns a {@linkplain GeocentricCRS geocentric coordinate reference system} from a code.
131 *
132 * @param code Value allocated by authority.
133 * @return The coordinate reference system for the given code.
134 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
135 * @throws FactoryException if the object creation failed.
136 *
137 * @see org.opengis.referencing.datum.DatumAuthorityFactory#createGeodeticDatum
138 */
139 GeocentricCRS createGeocentricCRS(String code)
140 throws NoSuchAuthorityCodeException, FactoryException;
141
142 /**
143 * Create a {@linkplain ImageCRS image coordinate reference system} from a code.
144 *
145 * @param code Value allocated by authority.
146 * @return The coordinate reference system for the given code.
147 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
148 * @throws FactoryException if the object creation failed for some other reason.
149 */
150 ImageCRS createImageCRS(String code)
151 throws NoSuchAuthorityCodeException, FactoryException;
152
153 /**
154 * Returns a {@linkplain ProjectedCRS projected coordinate reference system} from a code.
155 *
156 * @param code Value allocated by authority.
157 * @return The coordinate reference system for the given code.
158 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
159 * @throws FactoryException if the object creation failed for some other reason.
160 *
161 * @see org.opengis.referencing.datum.DatumAuthorityFactory#createGeodeticDatum
162 */
163 @UML(identifier="createProjectedCoordinateSystem", specification=OGC_01009)
164 ProjectedCRS createProjectedCRS(String code)
165 throws NoSuchAuthorityCodeException, FactoryException;
166
167 /**
168 * Create a {@linkplain TemporalCRS temporal coordinate reference system} from a code.
169 *
170 * @param code Value allocated by authority.
171 * @return The coordinate reference system for the given code.
172 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
173 * @throws FactoryException if the object creation failed for some other reason.
174 *
175 * @see org.opengis.referencing.datum.DatumAuthorityFactory#createTemporalDatum
176 */
177 TemporalCRS createTemporalCRS(String code)
178 throws NoSuchAuthorityCodeException, FactoryException;
179
180 /**
181 * Create a {@linkplain VerticalCRS vertical coordinate reference system} from a code.
182 *
183 * @param code Value allocated by authority.
184 * @return The coordinate reference system for the given code.
185 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
186 * @throws FactoryException if the object creation failed for some other reason.
187 *
188 * @see org.opengis.referencing.datum.DatumAuthorityFactory#createVerticalDatum
189 */
190 @UML(identifier="createVerticalCoordinateSystem", specification=OGC_01009)
191 VerticalCRS createVerticalCRS(String code)
192 throws NoSuchAuthorityCodeException, FactoryException;
193 }