org.geotoolkit.referencing.factory.epsg
Class LongitudeFirstEpsgFactory

Object
  extended by Factory
      extended by ReferencingFactory
          extended by AbstractAuthorityFactory
              extended by AuthorityFactoryAdapter
                  extended by TransformedAuthorityFactory
                      extended by OrderedAxisAuthorityFactory
                          extended by LongitudeFirstEpsgFactory
All Implemented Interfaces:
Comparator<CoordinateSystemAxis>, AuthorityFactory, CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory, Factory

@ThreadSafe
public class LongitudeFirstEpsgFactory
extends OrderedAxisAuthorityFactory
implements CRSAuthorityFactory, CSAuthorityFactory, CoordinateOperationAuthorityFactory, DatumAuthorityFactory

An EPSG authority factory using (longitude, latitude) axis order. This factory wraps a ThreadedEpsgFactory into an OrderedAxisAuthorityFactory when first needed.

Users don't need to create explicitly an instance of this class. Instead, one can get an instance using the following code:

Hints hints = new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE);
CRSAuthorityFactory factory = AuthorityFactoryFinder.getCRSAuthorityFactory("EPSG", hints);


To be more specific...
The name of this class contains "longitude first" for simplicity, because the axes reordering apply mostly to geographic CRS (in contrast, most projected CRS already have (x, y) axis order, in which case this class has no effect). However, what this implementation actually does is to force a right-handed coordinate system. This approach works for projected CRS as well as geographic CRS ("longitude first" is an inappropriate expression for projected CRS). It even works in cases like stereographic projections, where the axes names look like (South along 180°, South along 90°E). In such cases, aiming for "longitude first" would not make sense.

Note: This class implements also the DatumAuthorityFactory interface as a matter of principle, in order to have a single class implementing all factories. However this is in theory useless since "axis order" doesn't make any sense for datum.

Since:
2.3
Version:
3.00
Author:
Martin Desruisseaux (IRD)
See Also:
OrderedAxisAuthorityFactory, Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER
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 OrderedAxisAuthorityFactory
forceStandardDirections, forceStandardUnits
 
Fields inherited from class AbstractAuthorityFactory
nameFactory
 
Fields inherited from class ReferencingFactory
LOGGER
 
Fields inherited from class Factory
EMPTY_HINTS, hints
 
Constructor Summary
LongitudeFirstEpsgFactory()
          Creates a default factory.
LongitudeFirstEpsgFactory(Hints userHints)
          Creates a factory from the specified set of hints.
 
Method Summary
 Citation getAuthority()
          Returns the authority for this EPSG database.
protected  void setOrdering(Factory.Organizer organizer)
          Specifies that this factory should give precedence to ThreadedEpsgFactory.
 
Methods inherited from class OrderedAxisAuthorityFactory
compare, replace, replace
 
Methods inherited from class TransformedAuthorityFactory
createFromCoordinateReferenceSystemCodes, dispose, replace, replace, replace, replace, replace
 
Methods inherited from class AuthorityFactoryAdapter
availability, createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateReferenceSystem, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringCRS, createEngineeringDatum, createExtent, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createObject, createOperationMethod, createParameterDescriptor, createPolarCS, createPrimeMeridian, createProjectedCRS, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, getAuthorityCodes, getAuthorityFactory, getAuthorityFactory, getBackingStoreDescription, getCoordinateOperationAuthorityFactory, getCRSAuthorityFactory, getCSAuthorityFactory, getDatumAuthorityFactory, getDescriptionText, getIdentifiedObjectFinder, getImplementationHints, getVendor, toBackingFactoryCode
 
Methods inherited from class AbstractAuthorityFactory
noSuchAuthorityCode, trimAuthority
 
Methods inherited from class ReferencingFactory
ensureNonNull
 
Methods inherited from class Factory
equals, hasCompatibleHints, hashCode, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface CRSAuthorityFactory
createCompoundCRS, createCoordinateReferenceSystem, createDerivedCRS, createEngineeringCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createProjectedCRS, createTemporalCRS, createVerticalCRS
 
Methods inherited from interface CSAuthorityFactory
createCartesianCS, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createEllipsoidalCS, createPolarCS, createSphericalCS, createTimeCS, createUnit, createVerticalCS
 
Methods inherited from interface CoordinateOperationAuthorityFactory
createCoordinateOperation, createFromCoordinateReferenceSystemCodes, createOperationMethod
 
Methods inherited from interface DatumAuthorityFactory
createDatum, createEllipsoid, createEngineeringDatum, createGeodeticDatum, createImageDatum, createPrimeMeridian, createTemporalDatum, createVerticalDatum
 
Methods inherited from interface AuthorityFactory
createObject, getAuthorityCodes, getDescriptionText
 
Methods inherited from interface Factory
getVendor
 
Methods inherited from interface Comparator
equals
 

Constructor Detail

LongitudeFirstEpsgFactory

public LongitudeFirstEpsgFactory()
Creates a default factory. The FORCE_LONGITUDE_FIRST_AXIS_ORDER hint is always set to TRUE. The FORCE_STANDARD_AXIS_DIRECTIONS and FORCE_STANDARD_AXIS_UNITS hints are set to FALSE by default. A different value for those two hints can be specified using the constructor below.


LongitudeFirstEpsgFactory

public LongitudeFirstEpsgFactory(Hints userHints)
Creates a factory from the specified set of hints.

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

setOrdering

protected void setOrdering(Factory.Organizer organizer)
Specifies that this factory should give precedence to ThreadedEpsgFactory. So by default, the referencing framework will create CRS objects with axis order as defined by the EPSG database in preference to CRS objects having the longitude before the latitude.

Overrides:
setOrdering in class Factory
Since:
3.00

getAuthority

public Citation getAuthority()
Returns the authority for this EPSG database. This authority will contains the database version in the edition attribute, together with the edition date.

Specified by:
getAuthority in interface AuthorityFactory
Overrides:
getAuthority in class AuthorityFactoryAdapter


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