public class TransformedAuthorityFactory extends AuthorityFactoryAdapter
replace(...)
methods to be overridden by
subclasses in order to replace some CRS, CS or datum objects by other ones. The replacement rules are
determined by the subclass being used. For example the OrderedAxisAuthorityFactory
subclass can replace coordinate systems using (latitude,
longitude) axis order by coordinate systems using (longitude,
latitude) axis order.
All constructors are protected because this class must be subclassed in order to determine
which of the DatumAuthorityFactory
, CSAuthorityFactory
and CRSAuthorityFactory
interfaces to implement.
LOGGER
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
Modifier | Constructor and Description |
---|---|
protected |
TransformedAuthorityFactory(AuthorityFactory factory)
Creates a wrapper around the specified factory.
|
protected |
TransformedAuthorityFactory(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory,
CoordinateOperationAuthorityFactory opFactory)
Creates a wrapper around the specified factories.
|
protected |
TransformedAuthorityFactory(String authority,
Hints userHints)
Creates a wrappers around the default factories for the specified authority.
|
Modifier and Type | Method and Description |
---|---|
Set<CoordinateOperation> |
createFromCoordinateReferenceSystemCodes(String sourceCode,
String targetCode)
Creates an operation from coordinate reference system codes.
|
void |
dispose()
Releases resources immediately instead of waiting for the garbage collector.
|
int |
getPriority()
Returns the priority for this factory.
|
protected AxisDirection |
replace(AxisDirection direction)
Replaces the specified direction, if applicable.
|
protected CoordinateOperation |
replace(CoordinateOperation operation)
Replaces (if needed) the specified coordinate operation.
|
protected CoordinateReferenceSystem |
replace(CoordinateReferenceSystem crs)
Replaces (if needed) the specified coordinate reference system.
|
protected CoordinateSystem |
replace(CoordinateSystem cs)
Replaces (if needed) the specified coordinate system by a new one.
|
protected CoordinateSystemAxis |
replace(CoordinateSystemAxis axis)
Replaces (if needed) the specified axis by a new one.
|
protected Datum |
replace(Datum datum)
Replaces (if needed) the specified datum by a new one.
|
protected Unit<?> |
replace(Unit<?> units)
Replaces the specified unit, if applicable.
|
createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateReferenceSystem, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringCRS, createEngineeringDatum, createExtent, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createObject, createOperationMethod, createParameterDescriptor, createPolarCS, createPrimeMeridian, createProjectedCRS, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, getAuthority, getAuthorityCodes, getAuthorityFactory, getBackingStoreDescription, getCoordinateOperationAuthorityFactory, getCRSAuthorityFactory, getCSAuthorityFactory, getDatumAuthorityFactory, getDescriptionText, getIdentifiedObjectFinder, getVendor, isAvailable, notifySuccess, toBackingFactoryCode
noSuchAuthorityCode, trimAuthority
ensureNonNull
addImplementationHints, equals, getImplementationHints, hashCode, onDeregistration, onRegistration, toString
getImplementationHints
protected TransformedAuthorityFactory(AuthorityFactory factory)
factory
- The factory to wrap.protected TransformedAuthorityFactory(CRSAuthorityFactory crsFactory, CSAuthorityFactory csFactory, DatumAuthorityFactory datumFactory, CoordinateOperationAuthorityFactory opFactory)
crsFactory
- The coordinate reference system
authority factory, or null
.csFactory
- The coordinate system authority factory, or
null
.datumFactory
- The datum authority factory, or null
.opFactory
- The coordinate operation authority factory,
or null
.protected TransformedAuthorityFactory(String authority, Hints userHints) throws FactoryRegistryException
ReferencingFactoryFinder
.authority
- The authority to wraps (example: "EPSG"
). If null
, then all
authority factories must be explicitly specified in the set of hints.userHints
- An optional set of hints, or null
if none.FactoryRegistryException
- if at least one factory can not be obtained.public int getPriority()
ReferencingFactoryFinder
for selecting a preferred factory when many are found for the same
service. The default implementation returns priority + 1
,
which implies that this adapter has precedence over the wrapped factories. Subclasses should
override this method if they want a different priority order for this instance.getPriority
in class AbstractFactory
protected Unit<?> replace(Unit<?> units) throws FactoryException
replace(CoordinateSystem)
method. The default implementation returns the unit
unchanged.units
- The units to replace.units
if no change were needed.FactoryException
- if an error occured while creating the new units.protected AxisDirection replace(AxisDirection direction) throws FactoryException
replace(CoordinateSystem)
method. The default implementation returns the axis
direction unchanged.direction
- The axis direction to replace.direction
if no change were needed.FactoryException
- if an error occured while creating the new axis direction.protected CoordinateSystemAxis replace(CoordinateSystemAxis axis) throws FactoryException
replace(Unit)
and replace(AxisDirection)
.axis
- The coordinate system axis to replace.axis
if no change were needed.FactoryException
- if an error occured while creating the new coordinate system axis.protected CoordinateSystem replace(CoordinateSystem cs) throws FactoryException
replace
for each axis. In addition, axis are
sorted if this factory implements the Comparator
interface.cs
- The coordinate system to replace.cs
if no change were needed.FactoryException
- if an error occured while creating the new coordinate system.protected Datum replace(Datum datum) throws FactoryException
datum
- The datum to replace.datum
if no change were needed.FactoryException
- if an error occured while creating the new datum.protected CoordinateReferenceSystem replace(CoordinateReferenceSystem crs) throws FactoryException
crs
- The coordinate reference system to replace.crs
if no change were needed.FactoryException
- if an error occured while creating the new CRS object.protected CoordinateOperation replace(CoordinateOperation operation) throws FactoryException
operation
- The coordinate operation to replace.operation
if no change were needed.FactoryException
- if an error occured while creating the new operation object.public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCode, String targetCode) throws FactoryException
replace
for each operations.createFromCoordinateReferenceSystemCodes
in class AuthorityFactoryAdapter
sourceCode
- Coded value of source coordinate reference system.targetCode
- Coded value of target coordinate reference system.sourceCRS
to targetCRS
.FactoryException
- if the object creation failed.public void dispose() throws FactoryException
crsFactory
), because they may still in use by other classes.dispose
in class AuthorityFactoryAdapter
FactoryException
- if an error occured while disposing the factory.Copyright © 1996–2023 Geotools. All rights reserved.