|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.factory.AbstractFactory
org.geotools.referencing.factory.ReferencingFactory
org.geotools.referencing.factory.AbstractAuthorityFactory
org.geotools.referencing.factory.AuthorityFactoryAdapter
org.geotools.referencing.factory.TransformedAuthorityFactory
public class TransformedAuthorityFactory
An authority factory which returns modified CRS,
CS or datum objects from other factory
implementations. This class provides a set of 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.
Field Summary |
---|
Fields inherited from class org.geotools.referencing.factory.ReferencingFactory |
---|
LOGGER |
Fields inherited from class org.geotools.factory.AbstractFactory |
---|
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority |
Constructor Summary | |
---|---|
protected |
TransformedAuthorityFactory(org.opengis.referencing.AuthorityFactory factory)
Creates a wrapper around the specified factory. |
protected |
TransformedAuthorityFactory(org.opengis.referencing.crs.CRSAuthorityFactory crsFactory,
org.opengis.referencing.cs.CSAuthorityFactory csFactory,
org.opengis.referencing.datum.DatumAuthorityFactory datumFactory,
org.opengis.referencing.operation.CoordinateOperationAuthorityFactory opFactory)
Creates a wrapper around the specified factories. |
protected |
TransformedAuthorityFactory(java.lang.String authority,
Hints userHints)
Creates a wrappers around the default factories for the specified authority. |
Method Summary | |
---|---|
java.util.Set<org.opengis.referencing.operation.CoordinateOperation> |
createFromCoordinateReferenceSystemCodes(java.lang.String sourceCode,
java.lang.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 org.opengis.referencing.cs.AxisDirection |
replace(org.opengis.referencing.cs.AxisDirection direction)
Replaces the specified direction, if applicable. |
protected org.opengis.referencing.operation.CoordinateOperation |
replace(org.opengis.referencing.operation.CoordinateOperation operation)
Replaces (if needed) the specified coordinate operation. |
protected org.opengis.referencing.crs.CoordinateReferenceSystem |
replace(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Replaces (if needed) the specified coordinate reference system. |
protected org.opengis.referencing.cs.CoordinateSystem |
replace(org.opengis.referencing.cs.CoordinateSystem cs)
Replaces (if needed) the specified coordinate system by a new one. |
protected org.opengis.referencing.cs.CoordinateSystemAxis |
replace(org.opengis.referencing.cs.CoordinateSystemAxis axis)
Replaces (if needed) the specified axis by a new one. |
protected org.opengis.referencing.datum.Datum |
replace(org.opengis.referencing.datum.Datum datum)
Replaces (if needed) the specified datum by a new one. |
protected javax.measure.unit.Unit<?> |
replace(javax.measure.unit.Unit<?> units)
Replaces the specified unit, if applicable. |
Methods inherited from class org.geotools.referencing.factory.AbstractAuthorityFactory |
---|
noSuchAuthorityCode, trimAuthority |
Methods inherited from class org.geotools.referencing.factory.ReferencingFactory |
---|
ensureNonNull |
Methods inherited from class org.geotools.factory.AbstractFactory |
---|
addImplementationHints, equals, getImplementationHints, hashCode, onDeregistration, onRegistration, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.factory.Factory |
---|
getImplementationHints |
Constructor Detail |
---|
protected TransformedAuthorityFactory(org.opengis.referencing.AuthorityFactory factory)
factory
- The factory to wrap.protected TransformedAuthorityFactory(org.opengis.referencing.crs.CRSAuthorityFactory crsFactory, org.opengis.referencing.cs.CSAuthorityFactory csFactory, org.opengis.referencing.datum.DatumAuthorityFactory datumFactory, org.opengis.referencing.operation.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(java.lang.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.Method Detail |
---|
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 javax.measure.unit.Unit<?> replace(javax.measure.unit.Unit<?> units) throws org.opengis.referencing.FactoryException
replace(CoordinateSystem)
method. The
default implementation returns the unit unchanged.
units
- The units to replace.
units
if no change were needed.
org.opengis.referencing.FactoryException
- if an error occured while creating the new units.protected org.opengis.referencing.cs.AxisDirection replace(org.opengis.referencing.cs.AxisDirection direction) throws org.opengis.referencing.FactoryException
replace(CoordinateSystem)
method. The
default implementation returns the axis direction unchanged.
direction
- The axis direction to replace.
direction
if no change were needed.
org.opengis.referencing.FactoryException
- if an error occured while creating the new axis direction.protected org.opengis.referencing.cs.CoordinateSystemAxis replace(org.opengis.referencing.cs.CoordinateSystemAxis axis) throws org.opengis.referencing.FactoryException
replace(Unit)
and
replace(AxisDirection)
.
axis
- The coordinate system axis to replace.
axis
if no change were needed.
org.opengis.referencing.FactoryException
- if an error occured while creating the new coordinate system axis.protected org.opengis.referencing.cs.CoordinateSystem replace(org.opengis.referencing.cs.CoordinateSystem cs) throws org.opengis.referencing.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.
org.opengis.referencing.FactoryException
- if an error occured while creating the new coordinate system.protected org.opengis.referencing.datum.Datum replace(org.opengis.referencing.datum.Datum datum) throws org.opengis.referencing.FactoryException
datum
- The datum to replace.
datum
if no change were needed.
org.opengis.referencing.FactoryException
- if an error occured while creating the new datum.protected org.opengis.referencing.crs.CoordinateReferenceSystem replace(org.opengis.referencing.crs.CoordinateReferenceSystem crs) throws org.opengis.referencing.FactoryException
crs
- The coordinate reference system to replace.
crs
if no change were needed.
org.opengis.referencing.FactoryException
- if an error occured while creating the new CRS object.protected org.opengis.referencing.operation.CoordinateOperation replace(org.opengis.referencing.operation.CoordinateOperation operation) throws org.opengis.referencing.FactoryException
operation
- The coordinate operation to replace.
operation
if no change were needed.
org.opengis.referencing.FactoryException
- if an error occured while creating the new operation object.public java.util.Set<org.opengis.referencing.operation.CoordinateOperation> createFromCoordinateReferenceSystemCodes(java.lang.String sourceCode, java.lang.String targetCode) throws org.opengis.referencing.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
.
org.opengis.referencing.FactoryException
- if the object creation failed.public void dispose() throws org.opengis.referencing.FactoryException
crsFactory
), because they may
still in use by other classes.
dispose
in class AuthorityFactoryAdapter
org.opengis.referencing.FactoryException
- if an error occured while disposing the factory.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |