public class CoordinateOperationFactoryUsingWKT extends DeferredAuthorityFactory implements CoordinateOperationAuthorityFactory
This factory can be used as a replacement for Coordinate Operations when there is no access to a complete EPSG database. Or can be used to override the coordinate operations defined in EPSG if assigned a higher priority.
The Coordinate Operations are defined as Well Known Text math transforms (see
PropertyCoordinateOperationAuthorityFactory
for format specification and examples).
Property file name is "epsg_operations.properties", and its possible locations are described here. If no property file is found, the factory won't be activated.
If an operation is not found in the properties file, this factory will delegate creation on a
fallback factory. The fallback factory is the next registered CoordinateOperationAuthorityFactory
after this one in the priority chain.
Modifier and Type | Field and Description |
---|---|
protected Citation |
authority
The authority.
|
protected String |
directory
Directory scanned for extra definitions.
|
protected ReferencingFactoryContainer |
factories
The factories to be given to the backing store.
|
protected CoordinateOperationAuthorityFactory |
fallbackAuthorityFactory
An alternate factory to be used when the primary one doesn't find an operation
|
protected boolean |
fallbackAuthorityFactorySearched
Just a flag not to search more than once
|
static String |
FILENAME
The default filename to read.
|
static int |
PRIORITY
Priority for this factory
|
LOGGER
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
Constructor and Description |
---|
CoordinateOperationFactoryUsingWKT()
Constructs an authority factory using the default set of factories.
|
CoordinateOperationFactoryUsingWKT(Hints userHints)
Constructs an authority factory using a set of factories created from the specified hints.
|
CoordinateOperationFactoryUsingWKT(Hints userHints,
int priority)
Constructs an authority factory using the specified hints and priority.
|
Modifier and Type | Method and Description |
---|---|
protected AbstractAuthorityFactory |
createBackingStore()
Creates the backing store authority factory.
|
CoordinateOperation |
createCoordinateOperation(String code)
Creates an operation from a single operation code.
|
Set<CoordinateOperation> |
createFromCoordinateReferenceSystemCodes(String sourceCRS,
String targetCRS)
Creates operations from coordinate reference system
codes.
|
Citation |
getAuthority()
Returns the organization or party responsible for definition and maintenance of the
underlying database.
|
protected URL |
getDefinitionsURL()
Returns the URL to the property file that contains Operation definitions.
|
protected CoordinateOperationAuthorityFactory |
getFallbackAuthorityFactory()
Gets the next available
CoordinateOperationAuthorityFactory in the priority list. |
canDisposeBackingStore, dispose, disposeBackingStore, exit, getBackingStore, isAvailable, isConnected, setTimeout
createCartesianCS, createCompoundCRS, 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, getAuthorityCodes, getBackingStoreDescription, getDescriptionText, getIdentifiedObjectFinder, getVendor
noSuchAuthorityCode, trimAuthority
ensureNonNull
addImplementationHints, equals, getImplementationHints, getPriority, hashCode, onDeregistration, onRegistration, toString
createObject, getAuthorityCodes, getDescriptionText
getImplementationHints
protected Citation authority
getAuthority()
public static final String FILENAME
FactoryUsingWKT
implementation will search
for the first occurence of this file in the following places:
org/geotools/referencing/factory/espg
directories found on the
classpath.
getDefinitionsURL()
,
Constant Field Valuespublic static final int PRIORITY
protected final ReferencingFactoryContainer factories
protected final String directory
protected CoordinateOperationAuthorityFactory fallbackAuthorityFactory
protected boolean fallbackAuthorityFactorySearched
public CoordinateOperationFactoryUsingWKT()
public CoordinateOperationFactoryUsingWKT(Hints userHints)
public CoordinateOperationFactoryUsingWKT(Hints userHints, int priority)
public Citation getAuthority()
BufferedAuthorityFactory
getAuthority
in interface AuthorityFactory
getAuthority
in class BufferedAuthorityFactory
protected AbstractAuthorityFactory createBackingStore() throws FactoryException
createBackingStore
in class DeferredAuthorityFactory
createXXX(...)
methods.FactoryNotFoundException
- if the properties
file has not been found.FactoryException
- if the constructor failed to find or read the file. This exception
usually has an IOException
as its cause.protected URL getDefinitionsURL()
org/geotools/referencing/factory/epsg
directory on the classpath will be used.
null
if none.public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS) throws NoSuchAuthorityCodeException, FactoryException
This method searches in the properties file for operations.
If not found there, it will create operations from a fallback factory (see getFallbackAuthorityFactory()
).
createFromCoordinateReferenceSystemCodes
in interface CoordinateOperationAuthorityFactory
createFromCoordinateReferenceSystemCodes
in class BufferedAuthorityFactory
sourceCRS
- Coded value of source coordinate reference system.targetCRS
- Coded value of target coordinate reference system.sourceCRS
to targetCRS
.NoSuchAuthorityCodeException
- if a specified code was not found.FactoryException
- if the object creation failed for some other reason.public CoordinateOperation createCoordinateOperation(String code) throws NoSuchAuthorityCodeException, FactoryException
This method searches in the properties file for operations.
If not found there, it will create operations from a fallback factory (see getFallbackAuthorityFactory()
).
createCoordinateOperation
in interface CoordinateOperationAuthorityFactory
createCoordinateOperation
in class BufferedAuthorityFactory
code
- Coded value for operation.sourceCRS
to targetCRS
.NoSuchAuthorityCodeException
- if a specified code was not found.FactoryException
- if the object creation failed for some other reason.protected CoordinateOperationAuthorityFactory getFallbackAuthorityFactory() throws NoSuchAuthorityCodeException, FactoryException
CoordinateOperationAuthorityFactory
in the priority list.NoSuchAuthorityCodeException
- if a specified code was not found.FactoryException
- if the object creation failed for some other reason.Copyright © 1996–2023 Geotools. All rights reserved.