Class AutoCRSFactory
- All Implemented Interfaces:
AuthorityFactory,CRSAuthorityFactory,Factory,Factory,RegistrableFactory
- Since:
- 2.2
- Author:
- Jody Garnett, Rueben Schulz, Martin Desruisseaux, Simon Schafer
-
Field Summary
Fields inherited from class DirectAuthorityFactory
factoriesFields inherited from class ReferencingFactory
LOGGERFields inherited from class AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default factory for theAUTOauthority.AutoCRSFactory(Hints hints) Constructs a factory for theAUTOauthority using the specified hints. -
Method Summary
Modifier and TypeMethodDescriptionCreates a coordinate reference system from the specified code.createObject(String code) Creates an object from the specified code.createProjectedCRS(String code) Creates a projected coordinate reference system from the specified code.Returns the authority for this factory.getAuthorityCodes(Class<? extends IdentifiedObject> type) Provides a complete set of the known codes provided by this authority.getDescriptionText(String code) Returns the CRS name for the given code.Methods inherited from class DirectAuthorityFactory
getImplementationHintsMethods inherited from class AbstractAuthorityFactory
createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringCRS, createEngineeringDatum, createExtent, createFromCoordinateReferenceSystemCodes, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createOperationMethod, createParameterDescriptor, createPolarCS, createPrimeMeridian, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, dispose, getBackingStoreDescription, getIdentifiedObjectFinder, noSuchAuthorityCode, trimAuthorityMethods inherited from class ReferencingFactory
ensureNonNull, getVendorMethods inherited from class AbstractFactory
addImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toStringMethods inherited from interface CRSAuthorityFactory
createCompoundCRS, createDerivedCRS, createEngineeringCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createTemporalCRS, createVerticalCRS
-
Constructor Details
-
AutoCRSFactory
public AutoCRSFactory()Constructs a default factory for theAUTOauthority. -
AutoCRSFactory
Constructs a factory for theAUTOauthority using the specified hints.
-
-
Method Details
-
getAuthority
Returns the authority for this factory.- Specified by:
getAuthorityin interfaceAuthorityFactory- Specified by:
getAuthorityin classAbstractAuthorityFactory- Returns:
- The organization reponsible for definition of the database.
-
getAuthorityCodes
public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type) throws FactoryException Provides a complete set of the known codes provided by this authority. The returned set contains only numeric identifiers like"42001","42002", etc. The authority name ("AUTO") and thelon0,lat0part are not included. This is consistent with the codes returned by the EPSG factory and avoid duplication, since the authority is the same for every codes returned by this factory. It also make it easier for clients to prepend whatever authority name they wish, as for example in the all authorities factory.- Specified by:
getAuthorityCodesin interfaceAuthorityFactory- 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 empty set.
- Throws:
FactoryException- if access to the underlying database failed.
-
getDescriptionText
Returns the CRS name for the given code.- Specified by:
getDescriptionTextin interfaceAuthorityFactory- Parameters:
code- Value allocated by authority.- Returns:
- A description of the object, or
nullif the object corresponding to the specifiedcodehas no description. - Throws:
NoSuchAuthorityCodeException- if the specifiedcodewas not found.FactoryException- if the query failed for some other reason.
-
createObject
Creates an object from the specified code. The default implementation delegates tocreateCoordinateReferenceSystem(code).- Specified by:
createObjectin interfaceAuthorityFactory- Overrides:
createObjectin classAbstractAuthorityFactory- Parameters:
code- Value allocated by authority.- Returns:
- The object for the given code.
- Throws:
NoSuchAuthorityCodeException- if the specifiedcodewas not found.FactoryException- if the object creation failed for some other reason.- See Also:
-
createCoordinateReferenceSystem
public CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws FactoryException Creates a coordinate reference system from the specified code. The default implementation delegates tocreateProjectedCRS(code).- Specified by:
createCoordinateReferenceSystemin interfaceCRSAuthorityFactory- Overrides:
createCoordinateReferenceSystemin classAbstractAuthorityFactory- Parameters:
code- Value allocated by authority.- Returns:
- The coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException- if the specifiedcodewas not found.FactoryException- if the object creation failed for some other reason.- See Also:
-
AbstractAuthorityFactory.createGeographicCRS(java.lang.String)AbstractAuthorityFactory.createProjectedCRS(java.lang.String)AbstractAuthorityFactory.createVerticalCRS(java.lang.String)AbstractAuthorityFactory.createTemporalCRS(java.lang.String)AbstractAuthorityFactory.createCompoundCRS(java.lang.String)
-
createProjectedCRS
Creates a projected coordinate reference system from the specified code.- Specified by:
createProjectedCRSin interfaceCRSAuthorityFactory- Overrides:
createProjectedCRSin classAbstractAuthorityFactory- Parameters:
code- Value allocated by authority.- Returns:
- The coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException- if the specifiedcodewas not found.FactoryException- if the object creation failed for some other reason.- See Also:
-