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.datum;
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 Datum datum} objects using authority codes. External authorities are used to
044 * 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.crs.CRSAuthorityFactory
055 */
056 @UML(identifier="CS_CoordinateSystemAuthorityFactory", specification=OGC_01009)
057 public interface DatumAuthorityFactory extends AuthorityFactory {
058 /**
059 * Returns an arbitrary {@linkplain Datum datum} from a code. If the datum type is know at
060 * compile time, it is recommended to invoke the most precise method instead of this one
061 * (for example <code> {@linkplain #createGeodeticDatum createGeodeticDatum}(code) </code>
062 * instead of <code> createDatum(code) </code> if the caller know he is asking for a
063 * {@linkplain GeodeticDatum geodetic datum}).
064 *
065 * @param code Value allocated by authority.
066 * @return The datum for the given code.
067 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
068 * @throws FactoryException if the object creation failed for some other reason.
069 *
070 * @see #createGeodeticDatum(String)
071 * @see #createVerticalDatum(String)
072 * @see #createTemporalDatum(String)
073 */
074 Datum createDatum(String code)
075 throws NoSuchAuthorityCodeException, FactoryException;
076
077 /**
078 * Creates a {@linkplain EngineeringDatum engineering datum} from a code.
079 *
080 * @param code Value allocated by authority.
081 * @return The datum for the given code.
082 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
083 * @throws FactoryException if the object creation failed for some other reason.
084 *
085 * @see org.opengis.referencing.crs.CRSAuthorityFactory#createEngineeringCRS(String)
086 */
087 EngineeringDatum createEngineeringDatum(String code)
088 throws NoSuchAuthorityCodeException, FactoryException;
089
090 /**
091 * Creates a {@linkplain ImageDatum image datum} from a code.
092 *
093 * @param code Value allocated by authority.
094 * @return The datum for the given code.
095 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
096 * @throws FactoryException if the object creation failed for some other reason.
097 *
098 * @see org.opengis.referencing.crs.CRSAuthorityFactory#createImageCRS(String)
099 */
100 ImageDatum createImageDatum(String code)
101 throws NoSuchAuthorityCodeException, FactoryException;
102
103 /**
104 * Creates a {@linkplain VerticalDatum vertical datum} from a code.
105 *
106 * @param code Value allocated by authority.
107 * @return The datum for the given code.
108 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
109 * @throws FactoryException if the object creation failed for some other reason.
110 *
111 * @see org.opengis.referencing.crs.CRSAuthorityFactory#createVerticalCRS(String)
112 */
113 @UML(identifier="createVerticalDatum", specification=OGC_01009)
114 VerticalDatum createVerticalDatum(String code)
115 throws NoSuchAuthorityCodeException, FactoryException;
116
117 /**
118 * Creates a {@linkplain TemporalDatum temporal datum} from a code.
119 *
120 * @param code Value allocated by authority.
121 * @return The datum for the given code.
122 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
123 * @throws FactoryException if the object creation failed for some other reason.
124 *
125 * @see org.opengis.referencing.crs.CRSAuthorityFactory#createTemporalCRS(String)
126 */
127 TemporalDatum createTemporalDatum(String code)
128 throws NoSuchAuthorityCodeException, FactoryException;
129
130 /**
131 * Returns a {@linkplain GeodeticDatum geodetic datum} from a code.
132 *
133 * @param code Value allocated by authority.
134 * @return The datum for the given code.
135 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
136 * @throws FactoryException if the object creation failed for some other reason.
137 *
138 * @see #createEllipsoid(String)
139 * @see #createPrimeMeridian(String)
140 * @see org.opengis.referencing.crs.CRSAuthorityFactory#createGeographicCRS(String)
141 * @see org.opengis.referencing.crs.CRSAuthorityFactory#createProjectedCRS(String)
142 */
143 @UML(identifier="createHorizontalDatum", specification=OGC_01009)
144 GeodeticDatum createGeodeticDatum(String code)
145 throws NoSuchAuthorityCodeException, FactoryException;
146
147 /**
148 * Returns an {@linkplain Ellipsoid ellipsoid} from a code.
149 *
150 * @param code Value allocated by authority.
151 * @return The ellipsoid for the given code.
152 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
153 * @throws FactoryException if the object creation failed for some other reason.
154 *
155 * @see #createGeodeticDatum(String)
156 */
157 @UML(identifier="createEllipsoid", specification=OGC_01009)
158 Ellipsoid createEllipsoid(String code)
159 throws NoSuchAuthorityCodeException, FactoryException;
160
161 /**
162 * Returns a {@linkplain PrimeMeridian prime meridian} from a code.
163 *
164 * @param code Value allocated by authority.
165 * @return The prime meridian for the given code.
166 * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
167 * @throws FactoryException if the object creation failed for some other reason.
168 *
169 * @see #createGeodeticDatum(String)
170 */
171 @UML(identifier="createPrimeMeridian", specification=OGC_01009)
172 PrimeMeridian createPrimeMeridian(String code)
173 throws NoSuchAuthorityCodeException, FactoryException;
174 }