org.geotoolkit.referencing.factory.web
Class AutoCRSFactory

Object
  extended by Factory
      extended by ReferencingFactory
          extended by AbstractAuthorityFactory
              extended by DirectAuthorityFactory
                  extended by AutoCRSFactory
All Implemented Interfaces:
AuthorityFactory, CRSAuthorityFactory, Factory

@ThreadSafe
public class AutoCRSFactory
extends DirectAuthorityFactory
implements CRSAuthorityFactory

The factory for projected CRS in the AUTO and AUTO2 space. The expected format is AUTO:code,<unit>,lon0,lat0 where the AUTO prefix is optional. The <unit> parameter is also optional, since it was not present in the WMS 1.0 specification (it has been added later).

The parameters are as below:


Examples
An orthographic CRS centered at 100 degrees West longitude and 45 degrees North latitude, with ordinates in metres.

AUTO2:42003,1,-100,45
Same CRS as above, but with conversion factor allowing ordinate values in U.S. feet:
AUTO2:42003,0.3048006096012192,-100,45

Since:
2.0
Version:
3.16
Author:
Martin Desruisseaux (IRD, Geomatys), Jody Garnett (Refractions), Rueben Schulz (UBC)
Module:
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 DirectAuthorityFactory
factories
 
Fields inherited from class AbstractAuthorityFactory
nameFactory
 
Fields inherited from class ReferencingFactory
LOGGER
 
Fields inherited from class Factory
EMPTY_HINTS, hints
 
Constructor Summary
AutoCRSFactory()
          Constructs a default factory for the AUTO authority.
AutoCRSFactory(Hints userHints)
          Constructs a factory for the AUTO authority using the specified hints.
 
Method Summary
 CoordinateReferenceSystem createCoordinateReferenceSystem(String code)
          Creates a coordinate reference system from the specified code.
 IdentifiedObject createObject(String code)
          Creates an object from the specified code.
 ProjectedCRS createProjectedCRS(String code)
          Creates a projected coordinate reference system from the specified code.
 Citation getAuthority()
          Returns the authority for this factory.
 Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type)
          Provides a complete set of the known codes provided by this authority.
 InternationalString getDescriptionText(String code)
          Returns the CRS name for the given code.
 
Methods inherited from class DirectAuthorityFactory
getImplementationHints
 
Methods inherited from class AbstractAuthorityFactory
createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringCRS, createEngineeringDatum, createExtent, createFromCoordinateReferenceSystemCodes, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createOperationMethod, createParameterDescriptor, createPolarCS, createPrimeMeridian, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, dispose, getBackingStoreDescription, getIdentifiedObjectFinder, noSuchAuthorityCode, trimAuthority
 
Methods inherited from class ReferencingFactory
ensureNonNull, getVendor
 
Methods inherited from class Factory
availability, equals, hasCompatibleHints, hashCode, setOrdering, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface CRSAuthorityFactory
createCompoundCRS, createDerivedCRS, createEngineeringCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createTemporalCRS, createVerticalCRS
 
Methods inherited from interface Factory
getVendor
 

Constructor Detail

AutoCRSFactory

public AutoCRSFactory()
Constructs a default factory for the AUTO authority.


AutoCRSFactory

public AutoCRSFactory(Hints userHints)
Constructs a factory for the AUTO authority using the specified hints.

Parameters:
userHints - An optional set of hints, or null for the default ones.
Method Detail

getAuthority

public Citation getAuthority()
Returns the authority for this factory.

Specified by:
getAuthority in interface AuthorityFactory
Specified by:
getAuthority in class AbstractAuthorityFactory

getAuthorityCodes

public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type)
                              throws FactoryException
Provides a complete set of the known codes provided by this authority. The returned set contains only numeric identifiers like "42001", "42002", etc. The authority name ("AUTO") and the lon0,lat0 part are not included. This is consistent with the codes returned by the EPSG factory and avoid duplication, since the authority is the same for every codes returned by this factory. It also make it easier for clients to prepend whatever authority name they wish, as for example in the all authorities factory.

Specified by:
getAuthorityCodes in interface AuthorityFactory
Throws:
FactoryException

getDescriptionText

public InternationalString getDescriptionText(String code)
                                       throws FactoryException
Returns the CRS name for the given code.

Specified by:
getDescriptionText in interface AuthorityFactory
Throws:
FactoryException - if an error occurred while fetching the description.

createObject

public IdentifiedObject createObject(String code)
                              throws FactoryException
Creates an object from the specified code. The default implementation delegates to createCoordinateReferenceSystem(code).

Specified by:
createObject in interface AuthorityFactory
Overrides:
createObject in class AbstractAuthorityFactory
Parameters:
code - Value allocated by authority.
Throws:
FactoryException - if the object creation failed.

createCoordinateReferenceSystem

public CoordinateReferenceSystem createCoordinateReferenceSystem(String code)
                                                          throws FactoryException
Creates a coordinate reference system from the specified code. The default implementation delegates to createProjectedCRS(code).

Specified by:
createCoordinateReferenceSystem in interface CRSAuthorityFactory
Overrides:
createCoordinateReferenceSystem in class AbstractAuthorityFactory
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
FactoryException - if the object creation failed.

createProjectedCRS

public ProjectedCRS createProjectedCRS(String code)
                                throws FactoryException
Creates a projected coordinate reference system from the specified code.

Specified by:
createProjectedCRS in interface CRSAuthorityFactory
Overrides:
createProjectedCRS in class AbstractAuthorityFactory
Parameters:
code - Value allocated by authority.
Returns:
The coordinate reference system for the given code.
Throws:
FactoryException - if the object creation failed.


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.