org.geotools.cs
Class CoordinateSystemAuthorityFactory

java.lang.Object
  extended byorg.geotools.cs.CoordinateSystemAuthorityFactory

public abstract class CoordinateSystemAuthorityFactory
extends java.lang.Object

Creates spatial reference objects using codes. The codes are maintained by an external authority. A commonly used authority is EPSG, which is also used in the GeoTIFF standard.

Version:
$Id: CoordinateSystemAuthorityFactory.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux
See Also:
CS_CoordinateSystemAuthorityFactory

Field Summary
protected  CoordinateSystemFactory factory
          The underlying factory used for objects creation.
 
Constructor Summary
CoordinateSystemAuthorityFactory(CoordinateSystemFactory factory)
          Constructs an authority factory using the specified coordinate system factory.
 
Method Summary
 CompoundCoordinateSystem createCompoundCoordinateSystem(java.lang.String code)
          Returns a CompoundCoordinateSystem object from a code.
abstract  CoordinateSystem createCoordinateSystem(java.lang.String code)
          Returns a CoordinateSystem object from a code.
abstract  Datum createDatum(java.lang.String code)
          Returns a Datum object from a code.
abstract  Ellipsoid createEllipsoid(java.lang.String code)
          Returns an Ellipsoid object from a code.
 GeographicCoordinateSystem createGeographicCoordinateSystem(java.lang.String code)
          Returns a GeographicCoordinateSystem object from a code.
 HorizontalCoordinateSystem createHorizontalCoordinateSystem(java.lang.String code)
          Returns a HorizontalCoordinateSystem object from a code.
 HorizontalDatum createHorizontalDatum(java.lang.String code)
          Returns a HorizontalDatum object from a code.
 java.lang.Object createObject(java.lang.String code)
          Returns an arbitrary Object from a code.
abstract  PrimeMeridian createPrimeMeridian(java.lang.String code)
          Returns a PrimeMeridian object from a code.
 ProjectedCoordinateSystem createProjectedCoordinateSystem(java.lang.String code)
          Returns a ProjectedCoordinateSystem object from a code.
abstract  Unit createUnit(java.lang.String code)
          Returns a Unit object from a code.
 VerticalCoordinateSystem createVerticalCoordinateSystem(java.lang.String code)
          Returns a VerticalCoordinateSystem object from a code.
 VerticalDatum createVerticalDatum(java.lang.String code)
          Returns a VerticalDatum object from a code.
 void dispose()
          Releases resources immediately instead of waiting for the garbage collector.
abstract  java.lang.String getAuthority()
          Returns the authority name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected final CoordinateSystemFactory factory
The underlying factory used for objects creation.

Constructor Detail

CoordinateSystemAuthorityFactory

public CoordinateSystemAuthorityFactory(CoordinateSystemFactory factory)
Constructs an authority factory using the specified coordinate system factory.

Parameters:
factory - The underlying factory used for objects creation.
Method Detail

getAuthority

public abstract java.lang.String getAuthority()
Returns the authority name.


createObject

public java.lang.Object createObject(java.lang.String code)
                              throws org.opengis.referencing.FactoryException
Returns an arbitrary Object from a code. Subclasses can override this method if they are capable to automatically detect the object type from its code. The default implementation always throw an exception.

Parameters:
code - Value allocated by authority.
Returns:
The object.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
createCoordinateSystem(java.lang.String), createDatum(java.lang.String), createEllipsoid(java.lang.String), createUnit(java.lang.String)

createUnit

public abstract Unit createUnit(java.lang.String code)
                         throws org.opengis.referencing.FactoryException
Returns a Unit object from a code.

Parameters:
code - Value allocated by authority.
Returns:
The unit.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createLinearUnit(java.lang.String), CS_CoordinateSystemAuthorityFactory.createAngularUnit(java.lang.String)

createEllipsoid

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

Parameters:
code - Value allocated by authority.
Returns:
The ellipsoid.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createEllipsoid(java.lang.String)

createPrimeMeridian

public abstract PrimeMeridian createPrimeMeridian(java.lang.String code)
                                           throws org.opengis.referencing.FactoryException
Returns a PrimeMeridian object from a code.

Parameters:
code - Value allocated by authority.
Returns:
The prime meridian.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createPrimeMeridian(java.lang.String)

createDatum

public abstract Datum createDatum(java.lang.String code)
                           throws org.opengis.referencing.FactoryException
Returns a Datum object from a code.

Parameters:
code - Value allocated by authority.
Returns:
The datum.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
createHorizontalDatum(java.lang.String), createVerticalDatum(java.lang.String)

createHorizontalDatum

public HorizontalDatum createHorizontalDatum(java.lang.String code)
                                      throws org.opengis.referencing.FactoryException
Returns a HorizontalDatum object from a code. The default implementation invokes createDatum(java.lang.String).

Parameters:
code - Value allocated by authority.
Returns:
The horizontal datum.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createHorizontalDatum(java.lang.String)

createVerticalDatum

public VerticalDatum createVerticalDatum(java.lang.String code)
                                  throws org.opengis.referencing.FactoryException
Returns a VerticalDatum object from a code. The default implementation invokes createDatum(java.lang.String).

Parameters:
code - Value allocated by authority.
Returns:
The vertical datum.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createVerticalDatum(java.lang.String)

createCoordinateSystem

public abstract CoordinateSystem createCoordinateSystem(java.lang.String code)
                                                 throws org.opengis.referencing.FactoryException
Returns a CoordinateSystem object from a code.

Parameters:
code - Value allocated by authority.
Returns:
The coordinate system.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
createHorizontalCoordinateSystem(java.lang.String), createGeographicCoordinateSystem(java.lang.String), createProjectedCoordinateSystem(java.lang.String), createVerticalCoordinateSystem(java.lang.String), createCompoundCoordinateSystem(java.lang.String)

createHorizontalCoordinateSystem

public HorizontalCoordinateSystem createHorizontalCoordinateSystem(java.lang.String code)
                                                            throws org.opengis.referencing.FactoryException
Returns a HorizontalCoordinateSystem object from a code. The default implementation invokes createCoordinateSystem(java.lang.String).

Parameters:
code - Value allocated by authority.
Returns:
The horizontal coordinate system.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createHorizontalCoordinateSystem(java.lang.String)

createGeographicCoordinateSystem

public GeographicCoordinateSystem createGeographicCoordinateSystem(java.lang.String code)
                                                            throws org.opengis.referencing.FactoryException
Returns a GeographicCoordinateSystem object from a code. The default implementation invokes createHorizontalCoordinateSystem(java.lang.String).

Parameters:
code - Value allocated by authority.
Returns:
The geographic coordinate system.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createGeographicCoordinateSystem(java.lang.String)

createProjectedCoordinateSystem

public ProjectedCoordinateSystem createProjectedCoordinateSystem(java.lang.String code)
                                                          throws org.opengis.referencing.FactoryException
Returns a ProjectedCoordinateSystem object from a code. The default implementation invokes createHorizontalCoordinateSystem(java.lang.String).

Parameters:
code - Value allocated by authority.
Returns:
The projected coordinate system.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createProjectedCoordinateSystem(java.lang.String)

createVerticalCoordinateSystem

public VerticalCoordinateSystem createVerticalCoordinateSystem(java.lang.String code)
                                                        throws org.opengis.referencing.FactoryException
Returns a VerticalCoordinateSystem object from a code. The default implementation invokes createCoordinateSystem(java.lang.String).

Parameters:
code - Value allocated by authority.
Returns:
The vertical coordinate system.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createVerticalCoordinateSystem(java.lang.String)

createCompoundCoordinateSystem

public CompoundCoordinateSystem createCompoundCoordinateSystem(java.lang.String code)
                                                        throws org.opengis.referencing.FactoryException
Returns a CompoundCoordinateSystem object from a code. The default implementation invokes createCoordinateSystem(java.lang.String).

Parameters:
code - Value allocated by authority.
Returns:
The compound coordinate system.
Throws:
NoSuchAuthorityCodeException - if this method can't find the requested code.
org.opengis.referencing.FactoryException - if some other kind of failure occurred in the backing store. Most common failure causes include SQLException or IOException.
See Also:
CS_CoordinateSystemAuthorityFactory.createCompoundCoordinateSystem(java.lang.String)

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 create(...) 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.


Copyright © GeoTools. All Rights Reserved.