org.geotools.referencing.factory
Class FallbackAuthorityFactory

java.lang.Object
  extended by org.geotools.factory.AbstractFactory
      extended by org.geotools.referencing.factory.ReferencingFactory
          extended by org.geotools.referencing.factory.AbstractAuthorityFactory
              extended by org.geotools.referencing.factory.AuthorityFactoryAdapter
                  extended by org.geotools.referencing.factory.FallbackAuthorityFactory
All Implemented Interfaces:
javax.imageio.spi.RegisterableService, Factory, OptionalFactory, org.opengis.referencing.AuthorityFactory

public class FallbackAuthorityFactory
extends AuthorityFactoryAdapter

A factory which delegates all object creation to a primary factory, and fallback on an other one if the primary factory failed.

Since:
2.3
Version:
$Id: FallbackAuthorityFactory.java 31445 2008-09-07 18:14:23Z desruisseaux $
Author:
Martin Desruisseaux

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 FallbackAuthorityFactory(org.opengis.referencing.AuthorityFactory primary, org.opengis.referencing.AuthorityFactory fallback)
          Wraps a primary and a fallback authority factories.
 
Method Summary
static
<T extends org.opengis.referencing.AuthorityFactory>
T
create(java.lang.Class<T> type, java.util.Collection<T> factories)
          Wraps the specified authority factories.
static org.opengis.referencing.AuthorityFactory create(java.util.Collection<? extends org.opengis.referencing.AuthorityFactory> factories)
          Wraps the specified authority factories.
 org.opengis.referencing.cs.CartesianCS createCartesianCS(java.lang.String code)
          Creates a cartesian coordinate system from a code.
 org.opengis.referencing.crs.CompoundCRS createCompoundCRS(java.lang.String code)
          Creates a 3D coordinate reference system from a code.
 org.opengis.referencing.operation.CoordinateOperation createCoordinateOperation(java.lang.String code)
          Creates an operation from a single operation code.
 org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(java.lang.String code)
          Returns an arbitrary coordinate reference system from a code.
 org.opengis.referencing.cs.CoordinateSystem createCoordinateSystem(java.lang.String code)
          Returns an arbitrary coordinate system from a code.
 org.opengis.referencing.cs.CoordinateSystemAxis createCoordinateSystemAxis(java.lang.String code)
          Returns a coordinate system axis from a code.
 org.opengis.referencing.cs.CylindricalCS createCylindricalCS(java.lang.String code)
          Creates a cylindrical coordinate system from a code.
 org.opengis.referencing.datum.Datum createDatum(java.lang.String code)
          Returns an arbitrary datum from a code.
 org.opengis.referencing.crs.DerivedCRS createDerivedCRS(java.lang.String code)
          Creates a derived coordinate reference system from a code.
 org.opengis.referencing.datum.Ellipsoid createEllipsoid(java.lang.String code)
          Returns an ellipsoid from a code.
 org.opengis.referencing.cs.EllipsoidalCS createEllipsoidalCS(java.lang.String code)
          Creates an ellipsoidal coordinate system from a code.
 org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(java.lang.String code)
          Creates a engineering coordinate reference system from a code.
 org.opengis.referencing.datum.EngineeringDatum createEngineeringDatum(java.lang.String code)
          Creates a engineering datum from a code.
 org.opengis.metadata.extent.Extent createExtent(java.lang.String code)
          Returns a extent (usually an area of validity) from a code.
 java.util.Set<org.opengis.referencing.operation.CoordinateOperation> createFromCoordinateReferenceSystemCodes(java.lang.String sourceCRS, java.lang.String targetCRS)
          Creates an operation from coordinate reference system codes.
 org.opengis.referencing.crs.GeocentricCRS createGeocentricCRS(java.lang.String code)
          Returns a geocentric coordinate reference system from a code.
 org.opengis.referencing.datum.GeodeticDatum createGeodeticDatum(java.lang.String code)
          Returns a geodetic datum from a code.
 org.opengis.referencing.crs.GeographicCRS createGeographicCRS(java.lang.String code)
          Returns a geographic coordinate reference system from a code.
 org.opengis.referencing.crs.ImageCRS createImageCRS(java.lang.String code)
          Creates a image coordinate reference system from a code.
 org.opengis.referencing.datum.ImageDatum createImageDatum(java.lang.String code)
          Creates a image datum from a code.
 org.opengis.referencing.IdentifiedObject createObject(java.lang.String code)
          Returns an arbitrary object from a code.
 org.opengis.referencing.operation.OperationMethod createOperationMethod(java.lang.String code)
          Creates an operation method from a code.
 org.opengis.parameter.ParameterDescriptor createParameterDescriptor(java.lang.String code)
          Creates a parameter descriptor from a code.
 org.opengis.referencing.cs.PolarCS createPolarCS(java.lang.String code)
          Creates a polar coordinate system from a code.
 org.opengis.referencing.datum.PrimeMeridian createPrimeMeridian(java.lang.String code)
          Returns a prime meridian from a code.
 org.opengis.referencing.crs.ProjectedCRS createProjectedCRS(java.lang.String code)
          Returns a projected coordinate reference system from a code.
 org.opengis.referencing.cs.SphericalCS createSphericalCS(java.lang.String code)
          Creates a spherical coordinate system from a code.
 org.opengis.referencing.crs.TemporalCRS createTemporalCRS(java.lang.String code)
          Creates a temporal coordinate reference system from a code.
 org.opengis.referencing.datum.TemporalDatum createTemporalDatum(java.lang.String code)
          Creates a temporal datum from a code.
 org.opengis.referencing.cs.TimeCS createTimeCS(java.lang.String code)
          Creates a temporal coordinate system from a code.
 javax.measure.unit.Unit<?> createUnit(java.lang.String code)
          Returns an unit from a code.
 org.opengis.referencing.crs.VerticalCRS createVerticalCRS(java.lang.String code)
          Creates a vertical coordinate reference system from a code.
 org.opengis.referencing.cs.VerticalCS createVerticalCS(java.lang.String code)
          Creates a vertical coordinate system from a code.
 org.opengis.referencing.datum.VerticalDatum createVerticalDatum(java.lang.String code)
          Creates a vertical datum from a code.
 java.util.Set<java.lang.String> getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)
          Returns the set of authority codes for the specified type.
 org.opengis.util.InternationalString getDescriptionText(java.lang.String code)
          Returns a description for the object identified by the specified code.
 IdentifiedObjectFinder getIdentifiedObjectFinder(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)
          Returns a finder which can be used for looking up unidentified objects.
 
Methods inherited from class org.geotools.referencing.factory.AuthorityFactoryAdapter
dispose, getAuthority, getAuthorityFactory, getBackingStoreDescription, getCoordinateOperationAuthorityFactory, getCRSAuthorityFactory, getCSAuthorityFactory, getDatumAuthorityFactory, getVendor, isAvailable, toBackingFactoryCode
 
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, getPriority, 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

FallbackAuthorityFactory

protected FallbackAuthorityFactory(org.opengis.referencing.AuthorityFactory primary,
                                   org.opengis.referencing.AuthorityFactory fallback)
Wraps a primary and a fallback authority factories.

This constructor is protected because subclasses must declare which of the DatumAuthorityFactory, CSAuthorityFactory, CRSAuthorityFactory and CoordinateOperationAuthorityFactory interfaces they choose to implement.

Parameters:
primary - The primary factory.
fallback - The factory to use as a fallback if the primary factory failed.
See Also:
create(java.lang.Class, java.util.Collection)
Method Detail

create

public static <T extends org.opengis.referencing.AuthorityFactory> T create(java.lang.Class<T> type,
                                                                            java.util.Collection<T> factories)
                                                                 throws FactoryNotFoundException,
                                                                        java.lang.ClassCastException
Wraps the specified authority factories. If the specified collection contains more than one element, then a chain of FallbackAuthorityFactory instances is created.

Type Parameters:
T - The interface to implement.
Parameters:
type - The interface to implement. Should be one of DatumAuthorityFactory, CSAuthorityFactory, CRSAuthorityFactory or CoordinateOperationAuthorityFactory.
factories - The factories to wrap, in iteration order.
Returns:
The given factories as a chain of fallback factories.
Throws:
FactoryNotFoundException - if the collection doesn't contains at least one element.
java.lang.ClassCastException - if type is illegal.
FactoryNotFoundException

create

public static org.opengis.referencing.AuthorityFactory create(java.util.Collection<? extends org.opengis.referencing.AuthorityFactory> factories)
                                                       throws FactoryNotFoundException
Wraps the specified authority factories. If the specified collection contains more than one element, then a chain of FallbackAuthorityFactory instances is created. The type is inferred from the factories found in the collection.

Consider using create(type, factories) instead when the type is known at compile time.

Parameters:
factories - The factories to wrap, in iteration order.
Returns:
The given factories as a chain of fallback factories.
Throws:
FactoryNotFoundException - if the collection doesn't contains at least one element.
FactoryNotFoundException
Since:
2.4

getAuthorityCodes

public java.util.Set<java.lang.String> getAuthorityCodes(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)
                                                  throws org.opengis.referencing.FactoryException
Returns the set of authority codes for the specified type. The default implementation returns the union of the authority codes from the primary and the fallback factories.

Specified by:
getAuthorityCodes in interface org.opengis.referencing.AuthorityFactory
Overrides:
getAuthorityCodes in class AuthorityFactoryAdapter
Throws:
org.opengis.referencing.FactoryException

getDescriptionText

public org.opengis.util.InternationalString getDescriptionText(java.lang.String code)
                                                        throws org.opengis.referencing.FactoryException
Returns a description for the object identified by the specified code.

Specified by:
getDescriptionText in interface org.opengis.referencing.AuthorityFactory
Overrides:
getDescriptionText in class AuthorityFactoryAdapter
Throws:
org.opengis.referencing.FactoryException

createObject

public org.opengis.referencing.IdentifiedObject createObject(java.lang.String code)
                                                      throws org.opengis.referencing.FactoryException
Returns an arbitrary object from a code.

Specified by:
createObject in interface org.opengis.referencing.AuthorityFactory
Overrides:
createObject in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed.
See Also:
AuthorityFactoryAdapter.createCoordinateReferenceSystem(java.lang.String), AuthorityFactoryAdapter.createDatum(java.lang.String), AuthorityFactoryAdapter.createEllipsoid(java.lang.String), AuthorityFactoryAdapter.createUnit(java.lang.String)

createDatum

public org.opengis.referencing.datum.Datum createDatum(java.lang.String code)
                                                throws org.opengis.referencing.FactoryException
Returns an arbitrary datum from a code.

Overrides:
createDatum in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The datum for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createGeodeticDatum(java.lang.String), AuthorityFactoryAdapter.createVerticalDatum(java.lang.String), AuthorityFactoryAdapter.createTemporalDatum(java.lang.String)

createEngineeringDatum

public org.opengis.referencing.datum.EngineeringDatum createEngineeringDatum(java.lang.String code)
                                                                      throws org.opengis.referencing.FactoryException
Creates a engineering datum from a code.

Overrides:
createEngineeringDatum in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The datum for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createEngineeringCRS(java.lang.String)

createImageDatum

public org.opengis.referencing.datum.ImageDatum createImageDatum(java.lang.String code)
                                                          throws org.opengis.referencing.FactoryException
Creates a image datum from a code.

Overrides:
createImageDatum in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The datum for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createImageCRS(java.lang.String)

createVerticalDatum

public org.opengis.referencing.datum.VerticalDatum createVerticalDatum(java.lang.String code)
                                                                throws org.opengis.referencing.FactoryException
Creates a vertical datum from a code.

Overrides:
createVerticalDatum in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The datum for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createVerticalCRS(java.lang.String)

createTemporalDatum

public org.opengis.referencing.datum.TemporalDatum createTemporalDatum(java.lang.String code)
                                                                throws org.opengis.referencing.FactoryException
Creates a temporal datum from a code.

Overrides:
createTemporalDatum in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The datum for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createTemporalCRS(java.lang.String)

createGeodeticDatum

public org.opengis.referencing.datum.GeodeticDatum createGeodeticDatum(java.lang.String code)
                                                                throws org.opengis.referencing.FactoryException
Returns a geodetic datum from a code.

Overrides:
createGeodeticDatum in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The datum for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createEllipsoid(java.lang.String), AuthorityFactoryAdapter.createPrimeMeridian(java.lang.String), AuthorityFactoryAdapter.createGeographicCRS(java.lang.String), AuthorityFactoryAdapter.createProjectedCRS(java.lang.String)

createEllipsoid

public org.opengis.referencing.datum.Ellipsoid createEllipsoid(java.lang.String code)
                                                        throws org.opengis.referencing.FactoryException
Returns an ellipsoid from a code.

Overrides:
createEllipsoid in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The ellipsoid for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createGeodeticDatum(java.lang.String)

createPrimeMeridian

public org.opengis.referencing.datum.PrimeMeridian createPrimeMeridian(java.lang.String code)
                                                                throws org.opengis.referencing.FactoryException
Returns a prime meridian from a code.

Overrides:
createPrimeMeridian in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The prime meridian for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createGeodeticDatum(java.lang.String)

createExtent

public org.opengis.metadata.extent.Extent createExtent(java.lang.String code)
                                                throws org.opengis.referencing.FactoryException
Returns a extent (usually an area of validity) from a code.

Overrides:
createExtent in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The extent for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createCoordinateSystem

public org.opengis.referencing.cs.CoordinateSystem createCoordinateSystem(java.lang.String code)
                                                                   throws org.opengis.referencing.FactoryException
Returns an arbitrary coordinate system from a code.

Overrides:
createCoordinateSystem in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createCartesianCS

public org.opengis.referencing.cs.CartesianCS createCartesianCS(java.lang.String code)
                                                         throws org.opengis.referencing.FactoryException
Creates a cartesian coordinate system from a code.

Overrides:
createCartesianCS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createPolarCS

public org.opengis.referencing.cs.PolarCS createPolarCS(java.lang.String code)
                                                 throws org.opengis.referencing.FactoryException
Creates a polar coordinate system from a code.

Overrides:
createPolarCS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createCylindricalCS

public org.opengis.referencing.cs.CylindricalCS createCylindricalCS(java.lang.String code)
                                                             throws org.opengis.referencing.FactoryException
Creates a cylindrical coordinate system from a code.

Overrides:
createCylindricalCS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createSphericalCS

public org.opengis.referencing.cs.SphericalCS createSphericalCS(java.lang.String code)
                                                         throws org.opengis.referencing.FactoryException
Creates a spherical coordinate system from a code.

Overrides:
createSphericalCS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createEllipsoidalCS

public org.opengis.referencing.cs.EllipsoidalCS createEllipsoidalCS(java.lang.String code)
                                                             throws org.opengis.referencing.FactoryException
Creates an ellipsoidal coordinate system from a code.

Overrides:
createEllipsoidalCS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createVerticalCS

public org.opengis.referencing.cs.VerticalCS createVerticalCS(java.lang.String code)
                                                       throws org.opengis.referencing.FactoryException
Creates a vertical coordinate system from a code.

Overrides:
createVerticalCS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createTimeCS

public org.opengis.referencing.cs.TimeCS createTimeCS(java.lang.String code)
                                               throws org.opengis.referencing.FactoryException
Creates a temporal coordinate system from a code.

Overrides:
createTimeCS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createCoordinateSystemAxis

public org.opengis.referencing.cs.CoordinateSystemAxis createCoordinateSystemAxis(java.lang.String code)
                                                                           throws org.opengis.referencing.FactoryException
Returns a coordinate system axis from a code.

Overrides:
createCoordinateSystemAxis in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The axis for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createUnit

public javax.measure.unit.Unit<?> createUnit(java.lang.String code)
                                      throws org.opengis.referencing.FactoryException
Returns an unit from a code.

Overrides:
createUnit in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The unit for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createCoordinateReferenceSystem

public org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(java.lang.String code)
                                                                                      throws org.opengis.referencing.FactoryException
Returns an arbitrary coordinate reference system from a code.

Overrides:
createCoordinateReferenceSystem in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AuthorityFactoryAdapter.createGeographicCRS(java.lang.String), AuthorityFactoryAdapter.createProjectedCRS(java.lang.String), AuthorityFactoryAdapter.createVerticalCRS(java.lang.String), AuthorityFactoryAdapter.createTemporalCRS(java.lang.String), AuthorityFactoryAdapter.createCompoundCRS(java.lang.String)

createCompoundCRS

public org.opengis.referencing.crs.CompoundCRS createCompoundCRS(java.lang.String code)
                                                          throws org.opengis.referencing.FactoryException
Creates a 3D coordinate reference system from a code.

Overrides:
createCompoundCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createDerivedCRS

public org.opengis.referencing.crs.DerivedCRS createDerivedCRS(java.lang.String code)
                                                        throws org.opengis.referencing.FactoryException
Creates a derived coordinate reference system from a code.

Overrides:
createDerivedCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createEngineeringCRS

public org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(java.lang.String code)
                                                                throws org.opengis.referencing.FactoryException
Creates a engineering coordinate reference system from a code.

Overrides:
createEngineeringCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createGeographicCRS

public org.opengis.referencing.crs.GeographicCRS createGeographicCRS(java.lang.String code)
                                                              throws org.opengis.referencing.FactoryException
Returns a geographic coordinate reference system from a code.

Overrides:
createGeographicCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)

createGeocentricCRS

public org.opengis.referencing.crs.GeocentricCRS createGeocentricCRS(java.lang.String code)
                                                              throws org.opengis.referencing.FactoryException
Returns a geocentric coordinate reference system from a code.

Overrides:
createGeocentricCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)

createImageCRS

public org.opengis.referencing.crs.ImageCRS createImageCRS(java.lang.String code)
                                                    throws org.opengis.referencing.FactoryException
Creates a image coordinate reference system from a code.

Overrides:
createImageCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createProjectedCRS

public org.opengis.referencing.crs.ProjectedCRS createProjectedCRS(java.lang.String code)
                                                            throws org.opengis.referencing.FactoryException
Returns a projected coordinate reference system from a code.

Overrides:
createProjectedCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AbstractAuthorityFactory.createGeodeticDatum(java.lang.String)

createTemporalCRS

public org.opengis.referencing.crs.TemporalCRS createTemporalCRS(java.lang.String code)
                                                          throws org.opengis.referencing.FactoryException
Creates a temporal coordinate reference system from a code.

Overrides:
createTemporalCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AbstractAuthorityFactory.createTemporalDatum(java.lang.String)

createVerticalCRS

public org.opengis.referencing.crs.VerticalCRS createVerticalCRS(java.lang.String code)
                                                          throws org.opengis.referencing.FactoryException
Creates a vertical coordinate reference system from a code.

Overrides:
createVerticalCRS in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.
See Also:
AbstractAuthorityFactory.createVerticalDatum(java.lang.String)

createParameterDescriptor

public org.opengis.parameter.ParameterDescriptor createParameterDescriptor(java.lang.String code)
                                                                    throws org.opengis.referencing.FactoryException
Creates a parameter descriptor from a code.

Overrides:
createParameterDescriptor in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createOperationMethod

public org.opengis.referencing.operation.OperationMethod createOperationMethod(java.lang.String code)
                                                                        throws org.opengis.referencing.FactoryException
Creates an operation method from a code.

Overrides:
createOperationMethod in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The operation method for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createCoordinateOperation

public org.opengis.referencing.operation.CoordinateOperation createCoordinateOperation(java.lang.String code)
                                                                                throws org.opengis.referencing.FactoryException
Creates an operation from a single operation code.

Overrides:
createCoordinateOperation in class AuthorityFactoryAdapter
Parameters:
code - Value allocated by authority.
Returns:
The operation for the given code.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

createFromCoordinateReferenceSystemCodes

public java.util.Set<org.opengis.referencing.operation.CoordinateOperation> createFromCoordinateReferenceSystemCodes(java.lang.String sourceCRS,
                                                                                                                     java.lang.String targetCRS)
                                                                                                              throws org.opengis.referencing.FactoryException
Creates an operation from coordinate reference system codes.

Overrides:
createFromCoordinateReferenceSystemCodes in class AuthorityFactoryAdapter
Parameters:
sourceCRS - Coded value of source coordinate reference system.
targetCRS - Coded value of target coordinate reference system.
Returns:
The operations from sourceCRS to targetCRS.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed for all factories.

getIdentifiedObjectFinder

public IdentifiedObjectFinder getIdentifiedObjectFinder(java.lang.Class<? extends org.opengis.referencing.IdentifiedObject> type)
                                                 throws org.opengis.referencing.FactoryException
Returns a finder which can be used for looking up unidentified objects. The default implementation delegates the lookups to the primary factory, and fallback on the second one if the primary factory can't find a match.

Overrides:
getIdentifiedObjectFinder in class AuthorityFactoryAdapter
Parameters:
type - The type of objects to look for. Should be a GeoAPI interface like GeographicCRS.class, but this method accepts also implementation class. If the type is unknown, use IdentifiedObject.class. A more accurate type may help to speed up the search, since it reduces the amount of tables to scan in some implementations like the factories backed by EPSG database.
Returns:
A finder to use for looking up unidentified objects.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed.
Since:
2.4


Copyright © 1996-2010 Geotools. All Rights Reserved.