Package org.geotools.api.referencing
Interface AuthorityFactory
-
- All Superinterfaces:
Factory
- All Known Subinterfaces:
CoordinateOperationAuthorityFactory
,CRSAuthorityFactory
,CSAuthorityFactory
,DatumAuthorityFactory
- All Known Implementing Classes:
Abstract_URI_AuthorityFactory
,AbstractAuthorityFactory
,AbstractAuthorityMediator
,AbstractCachedAuthorityFactory
,AbstractEpsgFactory
,AbstractEpsgMediator
,AccessDialectEpsgFactory
,AllAuthoritiesFactory
,AnsiDialectEpsgFactory
,AuthorityFactoryAdapter
,AutoCRSFactory
,BufferedAuthorityFactory
,CachedAuthorityDecorator
,CachedCRSAuthorityDecorator
,CartesianAuthorityFactory
,CoordinateOperationFactoryUsingWKT
,DeferredAuthorityFactory
,DirectAuthorityFactory
,DirectEpsgFactory
,EPSGCRSAuthorityFactory
,EsriExtension
,FactoryUsingAnsiSQL
,FactoryUsingSQL
,FactoryUsingWKT
,FallbackAuthorityFactory
,HsqlDialectEpsgMediator
,HTTP_AuthorityFactory
,HTTP_URI_AuthorityFactory
,IAUAuthorityFactory
,IAULongitudeFirstFactory
,LongitudeFirstEpsgDecorator
,LongitudeFirstFactory
,ManyAuthoritiesFactory
,NetCDFCRSAuthorityFactory
,OGCAPICRSFactory
,OrderedAxisAuthorityFactory
,OrderedAxisCRSAuthorityFactory
,PropertyAuthorityFactory
,PropertyCoordinateOperationAuthorityFactory
,ThreadedAuthorityFactory
,ThreadedEpsgFactory
,ThreadedHsqlEpsgFactory
,ThreadedPostgreSQLEpsgFactory
,TransformedAuthorityFactory
,UnnamedExtension
,URN_AuthorityFactory
,WebCRSFactory
public interface AuthorityFactory extends Factory
Base interface for all authority factories. An authority is an organization that maintains definitions of authority codes. An authority code is a compact string defined by an authority to reference a particular spatial reference object. For example the European Petroleum Survey Group (EPSG) maintains a database of coordinate systems, and other spatial referencing objects, where each object has a code number ID. For example, the EPSG code for a WGS84 Lat/Lon coordinate system is '4326'.- Since:
- GeoAPI 1.0
- Author:
- Martin Desruisseaux (IRD)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IdentifiedObject
createObject(String code)
Returns an arbitrary object from a code.Citation
getAuthority()
Returns the organization or party responsible for definition and maintenance of the database.Set<String>
getAuthorityCodes(Class<? extends IdentifiedObject> type)
Returns the set of authority codes of the given type.InternationalString
getDescriptionText(String code)
Gets a description of the object corresponding to a code.
-
-
-
Method Detail
-
getAuthority
Citation getAuthority()
Returns the organization or party responsible for definition and maintenance of the database.- Returns:
- The organization reponsible for definition of the database.
-
getAuthorityCodes
Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type) throws FactoryException
Returns the set of authority codes of the given type. Thetype
argument specify the base class. For example if this factory is an instance ofCRSAuthorityFactory
, then:CoordinateReferenceSystem.class
asks for all authority codes accepted by one ofcreateGeographicCRS
,createProjectedCRS
,createVerticalCRS
,createTemporalCRS
and their friends.ProjectedCRS.class
asks only for authority codes accepted bycreateProjectedCRS
.
- Parameters:
type
- The spatial reference objects type.- Returns:
- The set of authority codes for spatial reference objects of the given type. If this factory doesn't contains any object of the given type, then this method returns an {@linkplain java.util.Collections.emptySet() empty set}.
- Throws:
FactoryException
- if access to the underlying database failed.
-
getDescriptionText
InternationalString getDescriptionText(String code) throws NoSuchAuthorityCodeException, FactoryException
Gets a description of the object corresponding to a code.- Parameters:
code
- Value allocated by authority.- Returns:
- A description of the object, or
null
if the object corresponding to the specifiedcode
has no description. - Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the query failed for some other reason.
-
createObject
IdentifiedObject createObject(String code) throws NoSuchAuthorityCodeException, FactoryException
Returns an arbitrary object from a code. The returned object will typically be an instance ofDatum
,CoordinateSystem
,ReferenceSystem
orCoordinateOperation
. If the type of the object is know at compile time, it is recommended to invoke the most precise method instead of this one (for examplecreateCoordinateReferenceSystem(code)
instead ofcreateObject(code)
if the caller know he is asking for a coordinate reference system).- Parameters:
code
- Value allocated by authority.- Returns:
- The object for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
DatumAuthorityFactory.createDatum(java.lang.String)
,CRSAuthorityFactory.createCoordinateReferenceSystem(java.lang.String)
-
-