org.geotools.referencing.factory
Class AbstractAuthorityFactory

java.lang.Object
  extended byorg.geotools.factory.AbstractFactory
      extended byorg.geotools.referencing.factory.AbstractFactory
          extended byorg.geotools.referencing.factory.AbstractAuthorityFactory
All Implemented Interfaces:
org.opengis.referencing.AuthorityFactory, org.opengis.referencing.operation.CoordinateOperationAuthorityFactory, org.opengis.referencing.crs.CRSAuthorityFactory, org.opengis.referencing.cs.CSAuthorityFactory, org.opengis.referencing.datum.DatumAuthorityFactory, Factory, org.opengis.referencing.Factory, javax.imageio.spi.RegisterableService
Direct Known Subclasses:
AllAuthoritiesFactory, AuthorityFactoryAdapter, AutoCRSFactory, BufferedAuthorityFactory, FactoryUsingSQL, PropertyAuthorityFactory, WebCRSFactory

public abstract class AbstractAuthorityFactory
extends AbstractFactory
implements org.opengis.referencing.datum.DatumAuthorityFactory, org.opengis.referencing.cs.CSAuthorityFactory, org.opengis.referencing.crs.CRSAuthorityFactory, org.opengis.referencing.operation.CoordinateOperationAuthorityFactory

Base class for authority factories. An authority is an organization that maintains definitions of authority codes. An authority code is a compact string defined by an authority to reference a particular spatial reference object. For example the European Petroleum Survey Group (EPSG) maintains a database of coordinate systems, and other spatial referencing objects, where each object has a code number ID. For example, the EPSG code for a WGS84 Lat/Lon coordinate system is '4326'.

The default implementation for all methods ultimately invokes createObject(java.lang.String), which may be the only method that a subclass need to override. However, other methods may be overriden as well for better performances.

Since:
2.1
Version:
$Id: AbstractAuthorityFactory.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux

Field Summary
protected  FactoryGroup factories
          The underlying factories used for objects creation.
 
Fields inherited from class org.geotools.referencing.factory.AbstractFactory
LOGGER
 
Fields inherited from class org.geotools.factory.AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
 
Constructor Summary
protected AbstractAuthorityFactory(Hints hints, int priority)
          Constructs an instance using the specified hints.
 
Method Summary
 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 createFromCoordinateReferenceSystemCodes(java.lang.String sourceCode, java.lang.String targetCode)
          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.units.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.
 void dispose()
          Releases resources immediately instead of waiting for the garbage collector.
abstract  org.opengis.metadata.citation.Citation getAuthority()
          Returns the organization or party responsible for definition and maintenance of the database.
 java.lang.String getBackingStoreDescription()
          Returns a description of the underlying backing store, or if unknow.
 java.util.Map getImplementationHints()
          Returns the implementation hints for this factory.
protected  org.opengis.referencing.NoSuchAuthorityCodeException noSuchAuthorityCode(java.lang.Class type, java.lang.String code)
          Creates an exception for an unknow authority code.
 void onRegistration(javax.imageio.spi.ServiceRegistry registry, java.lang.Class category)
          Called when this factory is added to the given of the given .
protected  java.lang.String trimAuthority(java.lang.String code)
          Trim the authority scope, if present.
 
Methods inherited from class org.geotools.referencing.factory.AbstractFactory
ensureNonNull, getVendor
 
Methods inherited from class org.geotools.factory.AbstractFactory
onDeregistration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.AuthorityFactory
getAuthorityCodes, getDescriptionText
 
Methods inherited from interface org.opengis.referencing.Factory
getVendor
 

Field Detail

factories

protected final FactoryGroup factories
The underlying factories used for objects creation.

Constructor Detail

AbstractAuthorityFactory

protected AbstractAuthorityFactory(Hints hints,
                                   int priority)
Constructs an instance using the specified hints. This constructor recognizes the CRS, CS, DATUM and MATH_TRANSFORM hints. In addition, the FactoryGroup.HINT_KEY hint may be used as a low-level substitute for all the above.

Parameters:
hints - The hints.
priority - The priority for this factory, as a number between MINIMUM_PRIORITY and MAXIMUM_PRIORITY inclusive.
Since:
2.2
Method Detail

getAuthority

public abstract org.opengis.metadata.citation.Citation getAuthority()
Returns the organization or party responsible for definition and maintenance of the database.

Specified by:
getAuthority in interface org.opengis.referencing.AuthorityFactory

getBackingStoreDescription

public java.lang.String getBackingStoreDescription()
                                            throws org.opengis.referencing.FactoryException
Returns a description of the underlying backing store, or if unknow. This is for example the database software used for storing the data. The default implementation returns always .

Throws:
org.opengis.referencing.FactoryException - if a failure occured while fetching the engine description.

createObject

public org.opengis.referencing.IdentifiedObject createObject(java.lang.String code)
                                                      throws org.opengis.referencing.FactoryException
Returns an arbitrary object from a code. The returned object will typically be an instance of Datum, CoordinateSystem, CoordinateReferenceSystem or CoordinateOperation. The default implementation always throw an exception. Subclasses should override this method if they are capable to automatically detect the object type from its code.

Specified by:
createObject in interface org.opengis.referencing.AuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
createCoordinateReferenceSystem(java.lang.String), createDatum(java.lang.String), createEllipsoid(java.lang.String), 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. The default implementation invokes createObject(code).

Specified by:
createDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
createGeodeticDatum(java.lang.String), createVerticalDatum(java.lang.String), 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. The default implementation invokes createDatum(code).

Specified by:
createEngineeringDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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. The default implementation invokes createDatum(code).

Specified by:
createImageDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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. The default implementation invokes createDatum(code).

Specified by:
createVerticalDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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. The default implementation invokes createDatum(code).

Specified by:
createTemporalDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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. The default implementation invokes createDatum(code).

Specified by:
createGeodeticDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
createEllipsoid(java.lang.String), createPrimeMeridian(java.lang.String), createGeographicCRS(java.lang.String), 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. The default implementation invokes createObject(code).

Specified by:
createEllipsoid in interface org.opengis.referencing.datum.DatumAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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. The default implementation invokes createObject(code).

Specified by:
createPrimeMeridian in interface org.opengis.referencing.datum.DatumAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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. The default implementation invokes createObject(code).

Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createObject(code).

Specified by:
createCoordinateSystem in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createCoordinateSystem(code).

Specified by:
createCartesianCS in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createCoordinateSystem(code).

Specified by:
createPolarCS in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createCoordinateSystem(code).

Specified by:
createCylindricalCS in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createCoordinateSystem(code).

Specified by:
createSphericalCS in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createCoordinateSystem(code).

Specified by:
createEllipsoidalCS in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createCoordinateSystem(code).

Specified by:
createVerticalCS in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createCoordinateSystem(code).

Specified by:
createTimeCS in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. The default implementation invokes createObject(code).

Specified by:
createCoordinateSystemAxis in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

createUnit

public javax.units.Unit createUnit(java.lang.String code)
                            throws org.opengis.referencing.FactoryException
Returns an unit from a code. The default implementation invokes createObject(code).

Specified by:
createUnit in interface org.opengis.referencing.cs.CSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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. If the coordinate reference system type is know at compile time, it is recommended to invoke the most precise method instead of this one (for example  createGeographicCRS(code)  instead of  createCoordinateReferenceSystem(code)  if the caller know he is asking for a geographic coordinate reference system).

Specified by:
createCoordinateReferenceSystem in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
createGeographicCRS(java.lang.String), createProjectedCRS(java.lang.String), createVerticalCRS(java.lang.String), createTemporalCRS(java.lang.String), 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.

Specified by:
createCompoundCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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.

Specified by:
createDerivedCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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.

Specified by:
createEngineeringCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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.

Specified by:
createGeographicCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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.

Specified by:
createGeocentricCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.FactoryException - if the object creation failed.
See Also:
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.

Specified by:
createImageCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.

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.

Specified by:
createProjectedCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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.

Specified by:
createTemporalCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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.

Specified by:
createVerticalCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
See Also:
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.

Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
Since:
2.2

createOperationMethod

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

Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
Since:
2.2

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.

Specified by:
createCoordinateOperation in interface org.opengis.referencing.operation.CoordinateOperationAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if the specified was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
Since:
2.2

createFromCoordinateReferenceSystemCodes

public java.util.Set createFromCoordinateReferenceSystemCodes(java.lang.String sourceCode,
                                                              java.lang.String targetCode)
                                                       throws org.opengis.referencing.FactoryException
Creates an operation from coordinate reference system codes.

Specified by:
createFromCoordinateReferenceSystemCodes in interface org.opengis.referencing.operation.CoordinateOperationAuthorityFactory
Parameters:
sourceCode - Coded value of source coordinate reference system.
targetCode - Coded value of target coordinate reference system.
Throws:
org.opengis.referencing.NoSuchAuthorityCodeException - if a specified code was not found.
org.opengis.referencing.FactoryException - if the object creation failed for some other reason.
Since:
2.2

dispose

public void dispose()
             throws org.opengis.referencing.FactoryException
Releases resources immediately instead of waiting for the garbage collector. Once a factory has been disposed, further invocations may throw a FactoryException. Disposing a previously-disposed factory, however, has no effect.

Throws:
org.opengis.referencing.FactoryException - if an error occured while disposing the factory.

getImplementationHints

public java.util.Map getImplementationHints()
Returns the implementation hints for this factory. The returned map contains values for CRS, CS, DATUM and MATH_TRANSFORM hints. Other values may be provided as well, at implementation choice.

Specified by:
getImplementationHints in interface Factory
Overrides:
getImplementationHints in class AbstractFactory
Returns:
The map of hints, or an empty map if none.

trimAuthority

protected java.lang.String trimAuthority(java.lang.String code)
Trim the authority scope, if present. For example if this factory is an EPSG authority factory and the specified code start with the "EPSG:" prefix, then the prefix is removed. Otherwise, the string is returned unchanged (except for leading and trailing spaces).

Parameters:
code - The code to trim.
Returns:
The code without the authority scope.

noSuchAuthorityCode

protected final org.opengis.referencing.NoSuchAuthorityCodeException noSuchAuthorityCode(java.lang.Class type,
                                                                                         java.lang.String code)
Creates an exception for an unknow authority code. This convenience method is provided for implementation of methods.

Parameters:
type - The GeoAPI interface that was to be created (e.g. ).
code - The unknow authority code.
Returns:
An exception initialized with an error message built from the specified informations.

onRegistration

public void onRegistration(javax.imageio.spi.ServiceRegistry registry,
                           java.lang.Class category)
Called when this factory is added to the given of the given . The factory may already be registered under another category or categories.

This method is invoked automatically when this factory is registered as a plugin, and should not be invoked directly by the user. The default implementation iterates through all services under the same category and for the same authority, and set the ordering according the priority given at construction time.

Specified by:
onRegistration in interface javax.imageio.spi.RegisterableService
Overrides:
onRegistration in class AbstractFactory
Parameters:
registry - a where this factory has been registered.
category - a object indicating the registry category under which this object has been registered.
See Also:
AbstractFactory.MINIMUM_PRIORITY, AbstractFactory.MAXIMUM_PRIORITY, FactoryFinder


Copyright © GeoTools. All Rights Reserved.