Class CartesianAuthorityFactory
- Object
-
- AbstractFactory
-
- ReferencingFactory
-
- AbstractAuthorityFactory
-
- DirectAuthorityFactory
-
- CartesianAuthorityFactory
-
- All Implemented Interfaces:
AuthorityFactory
,CRSAuthorityFactory
,Factory
,Factory
,RegistrableFactory
public class CartesianAuthorityFactory extends DirectAuthorityFactory implements CRSAuthorityFactory
A factory providing a EPSG code for a cartesian engineering systems- Author:
- Andrea Aime - GeoSolutions
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultEngineeringCRS
GENERIC_2D
A clone ofDefaultEngineeringCRS.GENERIC_2D
with the proper authority namestatic String
GENERIC_2D_CODE
-
Fields inherited from class DirectAuthorityFactory
factories
-
Fields inherited from class ReferencingFactory
LOGGER
-
Fields inherited from class AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
-
-
Constructor Summary
Constructors Constructor Description CartesianAuthorityFactory()
CartesianAuthorityFactory(Hints hints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinateReferenceSystem
createCoordinateReferenceSystem(String code)
Creates a coordinate reference system from the specified code.EngineeringCRS
createEngineeringCRS(String code)
Creates a engineering coordinate reference system from a code.IdentifiedObject
createObject(String code)
Creates an object from the specified 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.-
Methods inherited from class DirectAuthorityFactory
getImplementationHints
-
Methods inherited from class AbstractAuthorityFactory
createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringDatum, createExtent, createFromCoordinateReferenceSystemCodes, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createOperationMethod, createParameterDescriptor, createPolarCS, createPrimeMeridian, createProjectedCRS, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, dispose, getBackingStoreDescription, getIdentifiedObjectFinder, noSuchAuthorityCode, trimAuthority
-
Methods inherited from class ReferencingFactory
ensureNonNull, getVendor
-
Methods inherited from class AbstractFactory
addImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toString
-
Methods inherited from interface CRSAuthorityFactory
createCompoundCRS, createDerivedCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createProjectedCRS, createTemporalCRS, createVerticalCRS
-
-
-
-
Field Detail
-
GENERIC_2D_CODE
public static final String GENERIC_2D_CODE
- See Also:
- Constant Field Values
-
GENERIC_2D
public static final DefaultEngineeringCRS GENERIC_2D
A clone ofDefaultEngineeringCRS.GENERIC_2D
with the proper authority name
-
-
Constructor Detail
-
CartesianAuthorityFactory
public CartesianAuthorityFactory()
-
CartesianAuthorityFactory
public CartesianAuthorityFactory(Hints hints)
-
-
Method Detail
-
getAuthority
public Citation getAuthority()
Description copied from class:AbstractAuthorityFactory
Returns the organization or party responsible for definition and maintenance of the database.- Specified by:
getAuthority
in interfaceAuthorityFactory
- Specified by:
getAuthority
in classAbstractAuthorityFactory
- Returns:
- The organization reponsible for definition of the database.
-
getAuthorityCodes
public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type) throws FactoryException
Description copied from interface:AuthorityFactory
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
.
- Specified by:
getAuthorityCodes
in 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
public InternationalString getDescriptionText(String code) throws NoSuchAuthorityCodeException, FactoryException
Description copied from interface:AuthorityFactory
Gets a description of the object corresponding to a code.- Specified by:
getDescriptionText
in interfaceAuthorityFactory
- 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
public IdentifiedObject createObject(String code) throws FactoryException
Creates an object from the specified code. The default implementation delegates tocreateCoordinateReferenceSystem(code)
.- Specified by:
createObject
in interfaceAuthorityFactory
- Overrides:
createObject
in classAbstractAuthorityFactory
- 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:
AbstractAuthorityFactory.createCoordinateReferenceSystem(java.lang.String)
,AbstractAuthorityFactory.createDatum(java.lang.String)
,AbstractAuthorityFactory.createEllipsoid(java.lang.String)
,AbstractAuthorityFactory.createUnit(java.lang.String)
-
createCoordinateReferenceSystem
public CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws FactoryException
Creates a coordinate reference system from the specified code. The default implementation delegates tocreateEngineeringCRS(String)(code)
.- Specified by:
createCoordinateReferenceSystem
in interfaceCRSAuthorityFactory
- Overrides:
createCoordinateReferenceSystem
in classAbstractAuthorityFactory
- Parameters:
code
- Value allocated by authority.- Returns:
- The coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was 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)
-
createEngineeringCRS
public EngineeringCRS createEngineeringCRS(String code) throws NoSuchAuthorityCodeException, FactoryException
Description copied from class:AbstractAuthorityFactory
Creates a engineering coordinate reference system from a code.- Specified by:
createEngineeringCRS
in interfaceCRSAuthorityFactory
- Overrides:
createEngineeringCRS
in classAbstractAuthorityFactory
- Parameters:
code
- Value allocated by authority.- Returns:
- The coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.
-
-