public class PropertyCoordinateOperationAuthorityFactory extends DirectAuthorityFactory implements CoordinateOperationAuthorityFactory
CoordinateOperationAuthorityFactory
backed by a properties file. Allows custom
transform definitions across two CRSs, expressed as WKT math transforms. Entries in the
properties file take this format:
[source crs code],[target crs code]=[WKT math transform]Examples:
4230,4258=PARAM_MT["NTv2", PARAMETER["Latitude and longitude difference file", "100800401.gsb"]] 23031,25831=PARAM_MT["Similarity transformation", \ PARAMETER["Ordinate 1 of evaluation point in target CRS", -129.549], \ PARAMETER["Ordinate 2 of evaluation point in target CRS", -208.185], \ PARAMETER["Scale difference", 1.0000015504], \ PARAMETER["Rotation angle of source coordinate reference system axes", 1.56504]]For more compact definitions, parameter names can be replaced by their corresponding EPSG codes. Following examples are the same as former ones:
4230,4258=PARAM_MT["9615", PARAMETER["8656", "100800401.gsb"]] 23031,25831=PARAM_MT["9621", \ PARAMETER["8621", -129.549], \ PARAMETER["8622", -208.185], \ PARAMETER["8611", 1.0000015504], \ PARAMETER["8614", 1.56504]]References:
See Well-Known Text format for math transform syntax. Visit the EPSG Geodetic Parameter Registry for EPSG parameter codes and values.
Note that invertible transforms will be used in both directions.
This factory doesn't cache any result. Any call to a createFoo
method will trig a new
WKT parsing. For caching, this factory should be wrapped in some buffered factory like BufferedAuthorityFactory
.
factories
LOGGER
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
Constructor and Description |
---|
PropertyCoordinateOperationAuthorityFactory(ReferencingFactoryContainer factories,
Citation authority,
URL definitions)
Creates a factory for the specified authority from the specified file.
|
Modifier and Type | Method and Description |
---|---|
CoordinateOperation |
createCoordinateOperation(String code)
Creates an operation from a single operation code.
|
Set<CoordinateOperation> |
createFromCoordinateReferenceSystemCodes(String sourceCRS,
String targetCRS)
Creates a
CoordinateOperation from coordinate
reference system codes. |
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.
|
getImplementationHints
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, dispose, getBackingStoreDescription, getIdentifiedObjectFinder, noSuchAuthorityCode, trimAuthority
ensureNonNull, getVendor
addImplementationHints, equals, getPriority, hashCode, onDeregistration, onRegistration, toString
createObject
public PropertyCoordinateOperationAuthorityFactory(ReferencingFactoryContainer factories, Citation authority, URL definitions) throws IOException
factories
- The underlying factories used for objects creation.authority
- The organization or party responsible for definition and maintenance of the
database.definitions
- URL to the definition file.IOException
- if the definitions can't be read.public CoordinateOperation createCoordinateOperation(String code) throws NoSuchAuthorityCodeException, FactoryException
createCoordinateOperation
in interface CoordinateOperationAuthorityFactory
createCoordinateOperation
in class AbstractAuthorityFactory
code
- Coded value for operation.NoSuchAuthorityCodeException
- if the specified code
was not found.FactoryException
- if the object creation failed for some other reason.public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS) throws NoSuchAuthorityCodeException, FactoryException
CoordinateOperation
from coordinate
reference system codes. This method returns a single operation from the properties file. If
operation is invertible, will check also for the inverse one. If operation not found, it will
return an empty set.createFromCoordinateReferenceSystemCodes
in interface CoordinateOperationAuthorityFactory
createFromCoordinateReferenceSystemCodes
in class AbstractAuthorityFactory
sourceCRS
- Coded value of source coordinate reference system.targetCRS
- Coded value of target coordinate reference system.sourceCRS
to targetCRS
(one single element).NoSuchAuthorityCodeException
- if a specified code was not found.FactoryException
- if the object creation failed for some other reason.public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type)
This factory will not filter codes for its subclasses.
getAuthorityCodes
in interface AuthorityFactory
type
- The CoordinateOperation type (or null, same effect).public InternationalString getDescriptionText(String code) throws NoSuchAuthorityCodeException, FactoryException
getDescriptionText
in interface AuthorityFactory
code
- Value allocated by authority.null
if the object corresponding to the
specified code
has no description.NoSuchAuthorityCodeException
- if the specified code
was not found.FactoryException
- if the query failed for some other reason.public Citation getAuthority()
getAuthority
in interface AuthorityFactory
getAuthority
in class AbstractAuthorityFactory
Copyright © 1996–2023 Geotools. All rights reserved.