|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFactory
ReferencingFactory
AbstractAuthorityFactory
AuthorityFactoryAdapter
TransformedAuthorityFactory
@ThreadSafe @Decorator(value=org.opengis.referencing.AuthorityFactory.class) 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.
| referencing/geotk-referencing (download) | View source code for this class |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Factory |
|---|
Factory.Availability, Factory.Organizer |
| Field Summary |
|---|
| Fields inherited from class AbstractAuthorityFactory |
|---|
nameFactory |
| Fields inherited from class ReferencingFactory |
|---|
LOGGER |
| Fields inherited from class Factory |
|---|
EMPTY_HINTS, hints |
| Constructor Summary | |
|---|---|
protected |
TransformedAuthorityFactory(AuthorityFactory factory)
Creates a wrapper around the specified factory. |
protected |
TransformedAuthorityFactory(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory,
CoordinateOperationAuthorityFactory operationFactory)
Creates a wrapper around the specified factories. |
protected |
TransformedAuthorityFactory(String authority,
Hints userHints)
Creates a wrappers around the default factories for the specified authority. |
| Method Summary | |
|---|---|
Set<CoordinateOperation> |
createFromCoordinateReferenceSystemCodes(String sourceCRS,
String targetCRS)
Creates an operation from coordinate reference system codes. |
protected void |
dispose(boolean shutdown)
Releases resources immediately instead of waiting for the garbage collector. |
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. |
| Methods inherited from class AbstractAuthorityFactory |
|---|
noSuchAuthorityCode, trimAuthority |
| Methods inherited from class ReferencingFactory |
|---|
ensureNonNull |
| Methods inherited from class Factory |
|---|
equals, hasCompatibleHints, hashCode, setOrdering, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected TransformedAuthorityFactory(AuthorityFactory factory)
factory - The factory to wrap.
protected TransformedAuthorityFactory(CRSAuthorityFactory crsFactory,
CSAuthorityFactory csFactory,
DatumAuthorityFactory datumFactory,
CoordinateOperationAuthorityFactory operationFactory)
crsFactory - The coordinate reference system
authority factory, or null.csFactory - The coordinate system authority factory,
or null.datumFactory - The datum authority factory, or null.operationFactory - The coordinate operation authority factory,
or null.
protected TransformedAuthorityFactory(String authority,
Hints userHints)
throws FactoryRegistryException
AuthorityFactoryFinder.
authority - The authority to wrap (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 |
|---|
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 occurred 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 occurred 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 occurred 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 occurred 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 occurred 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 occurred 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 occurred while creating the new operation object.
public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS,
String targetCRS)
throws FactoryException
replace for each operations.
createFromCoordinateReferenceSystemCodes in class AuthorityFactoryAdaptersourceCRS - Coded value of source coordinate reference system.targetCRS - Coded value of target coordinate reference system.
sourceCRS to targetCRS.
FactoryException - if the object creation failed for some other reason.protected void dispose(boolean shutdown)
crsFactory), because they may still in use by other classes.
dispose in class AbstractAuthorityFactoryshutdown - false for normal disposal, or true if this method
is invoked during the process of a JVM shutdown.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||