Class MultiAuthoritiesFactory
- All Implemented Interfaces:
AuthorityFactory
,CRSAuthorityFactory
,CSAuthorityFactory
,DatumAuthorityFactory
,CoordinateOperationAuthorityFactory
,Factory
This factory requires that every codes given to a createFoo(String)
method are prefixed by a namespace,
for example "EPSG:4326"
or "EPSG::4326"
.
When a createFoo(String)
method is invoked, this class uses the authority part in the
“authority:code” argument for locating a factory capable to create a geodetic object
for the code part. If a factory is found in the list of factories given at construction time,
then the work is delegated to that factory. Otherwise a NoSuchAuthorityFactoryException
is thrown.
URI syntax
This factory can also parse URNs or URLs of the following forms:"urn:ogc:def:
type:
authority:
version:
code"
"http://www.opengis.net/def/
type/
authority/
version/
code"
"http://www.opengis.net/gml/srs/
authority.xml#
code"
MultiAuthoritiesFactory
uses the type information in the URN only for
delegating to a more specific method, never for delegating to a less specific method.
An exception will be thrown if the type in the URN is incompatible with the invoked method.
Example
IfcreateObject("urn:ogc:def:crs:EPSG::4326")
is invoked,
then MultiAuthoritiesFactory
will delegate (indirectly, ignoring caching for this example) the object
creation to EPSGDataAccess.createCoordinateReferenceSystem(String)
instead of EPSGDataAccess.createObject(String)
because of the
"crs"
part in the URN. The more specific method gives better performances and avoid ambiguities.
Compound URIs
This class accepts also combined URIs of the following forms (only two components shown, but arbitrary number of components is allowed):"urn:ogc:def:
type,
type₁:
authority₁:
version₁:
code₁,
type₂:
authority₂:
version₂:
code₂"
"http://www.opengis.net/def/crs-compound?
1=http://www.opengis.net/def/crs/
authority₁/
version₁/
code₁&
2=http://www.opengis.net/def/crs/
authority₂/
version₂/
code₂"
MultiAuthoritiesFactory
invokes createObject(String)
for each component
and combines the result as described by the CRS.compound(CoordinateReferenceSystem...)
method.
URNs (but not URLs) can also combine a
geodetic datum with an
ellipsoidal coordinate system for creating a new
geographic CRS, or a base geographic CRS with a
conversion and a
Cartesian coordinate system for creating a new
projected coordinate reference system, or
coordinate operations
for creating a concatenated operation.
Multiple versions for the same authority
MultiAuthoritiesFactory
accepts an arbitrary number of factories for the same authority, provided that
those factories have different version numbers. If a createFoo(String)
method is invoked with a URN
containing a version number different than zero, then MultiAuthoritiesFactory
will search for a factory
with that exact version, or throw a NoSuchAuthorityFactoryException
if no suitable factory is found.
If a createFoo(String)
method is invoked with the version number omitted, then MultiAuthoritiesFactory
will use the first factory in iteration order for the requested authority regardless of its version number.
Example
AMultiAuthoritiesFactory
instance could contain two EPSGFactory
instances:
one for version 8.2 and another one for version 7.9 of the EPSG dataset.
A specific version can be requested in the URN given to createFoo(String)
methods,
for example "urn:ogc:def:crs:EPSG:8.2:4326"
.
If no version is given of if the given version is zero,
then the first EPSG factory in iteration order is used regardless of its version number.
Multi-threading
This class is thread-safe if all delegate factories are themselves thread-safe. However, the factory providers, which are given to the constructor asIterable
instances,
do not need to be thread-safe. See constructor Javadoc for more information.- Since:
- 0.7
- See Also:
-
Constructor Summary
ConstructorDescriptionMultiAuthoritiesFactory
(Iterable<? extends CRSAuthorityFactory> crsFactories, Iterable<? extends CSAuthorityFactory> csFactories, Iterable<? extends DatumAuthorityFactory> datumFactories, Iterable<? extends CoordinateOperationAuthorityFactory> copFactories) Creates a new multi-factories instance using the given lists of factories. -
Method Summary
Modifier and TypeMethodDescriptioncreateCartesianCS
(String code) Creates a 2- or 3-dimensional Cartesian coordinate system made of straight orthogonal axes.createCompoundCRS
(String code) Creates a CRS describing the position of points through two or more independent coordinate reference systems.Creates an operation for transforming coordinates in the source CRS to coordinates in the target CRS.Creates an arbitrary coordinate reference system from a code.Creates an arbitrary coordinate system from a code.Creates a coordinate system axis with name, direction, unit and range of values.createCylindricalCS
(String code) Creates a 3-dimensional coordinate system made of a polar coordinate system extended by a straight perpendicular axis.createDatum
(String code) Creates an arbitrary datum from a code.createDerivedCRS
(String code) Creates a CRS that is defined by its coordinate conversion from another CRS (not by a datum).createEllipsoid
(String code) Creates a geometric figure that can be used to describe the approximate shape of the earth.createEllipsoidalCS
(String code) Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometimes with ellipsoidal height.createEngineeringCRS
(String code) Creates a 1-, 2- or 3-dimensional contextually local coordinate reference system.Creates a datum defining the origin of an engineering coordinate reference system.createExtent
(String code) Creates information about spatial, vertical, and temporal extent (usually a domain of validity) from a code.createFromCoordinateReferenceSystemCodes
(String sourceCRS, String targetCRS) Creates operations from source and target coordinate reference system codes.createGeocentricCRS
(String code) Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth.createGeodeticDatum
(String code) Creates a datum defining the location and orientation of an ellipsoid that approximates the shape of the earth.createGeographicCRS
(String code) Creates a 2- or 3-dimensional coordinate reference system based on an ellipsoidal approximation of the geoid.createImageCRS
(String code) Creates a 2-dimensional engineering coordinate reference system applied to locations in images.createImageDatum
(String code) Creates a datum defining the origin of an image coordinate reference system.createObject
(String code) Creates an arbitrary object from a code.Creates a description of the algorithm and parameters used to perform a coordinate operation.Creates a definition of a single parameter used by an operation method.createPolarCS
(String code) Creates a 2-dimensional coordinate system for coordinates represented by a distance from the origin and an angle from a fixed direction.createPrimeMeridian
(String code) Creates a prime meridian defining the origin from which longitude values are determined.createProjectedCRS
(String code) Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface.createSphericalCS
(String code) Creates a 3-dimensional coordinate system with one distance measured from the origin and two angular coordinates.createTemporalCRS
(String code) Creates a 1-dimensional coordinate reference system used for the recording of time.createTemporalDatum
(String code) Creates a datum defining the origin of a temporal coordinate reference system.createTimeCS
(String code) Creates a 1-dimensional coordinate system for heights or depths of points.Unit
<?> createUnit
(String code) Creates an unit of measurement from a code.createVerticalCRS
(String code) Creates a 1-dimensional coordinate reference system used for recording heights or depths.createVerticalCS
(String code) Creates a 1-dimensional coordinate system for heights or depths of points.createVerticalDatum
(String code) Creates a datum identifying a particular reference level surface used as a zero-height surface.Returns the database or specification that defines the codes recognized by this factory.getAuthorityCodes
(Class<? extends IdentifiedObject> type) Returns the set of authority codes for objects of the given type.final <T extends AuthorityFactory>
TgetAuthorityFactory
(Class<T> type, String authority, String version) Returns the factory identified by the given type, authority and version.Returns the code spaces of all factories given to the constructor.getDescriptionText
(String code) Returns a description of the object corresponding to a code.boolean
Returns whether this factory should relax some rules when processing a given authority code.Creates a finder which can be used for looking up unidentified objects.void
reload()
Clears the cache and notifies thisMultiAuthoritiesFactory
that all factories will need to be fetched again from the providers given at construction time.void
setLenient
(boolean lenient) Sets whether this factory should relax some rules when processing a given code.Methods inherited from class GeodeticAuthorityFactory
createParametricCRS, createParametricCS, createParametricDatum, toString, trimNamespace
Methods inherited from class AbstractFactory
getVendor
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface Factory
getVendor
-
Constructor Details
-
MultiAuthoritiesFactory
public MultiAuthoritiesFactory(Iterable<? extends CRSAuthorityFactory> crsFactories, Iterable<? extends CSAuthorityFactory> csFactories, Iterable<? extends DatumAuthorityFactory> datumFactories, Iterable<? extends CoordinateOperationAuthorityFactory> copFactories) Creates a new multi-factories instance using the given lists of factories. Calls tocreateFoo(String)
methods will scan the supplied factories in their iteration order when first needed. The first factory having the requested namespace will be used.Requirements
MultiAuthoritiesFactory
may iterate over the sameIterable
more than once. Each iteration shall return the same instances than previous iterations, unlessreload()
has been invoked.The
Iterable
s do not need to be thread-safe.MultiAuthoritiesFactory
will use them only in blocks synchronized on theIterable
instance. For example, all usages ofcrsFactory
will be done inside asynchronized(crsFactory)
block.Name collision
If anIterable
contains more than one factory for the same namespace and version, then only the first occurrence will be used. All additional factories for the same namespace and version will be ignored, after a warning has been logged.Caching
MultiAuthoritiesFactory
caches the factories found from the givenIterable
s, but does not cache the objects created by those factories. This constructor assumes that the given factories already do their own caching.- Parameters:
crsFactories
- the factories for creatingCoordinateReferenceSystem
objects, or null if none.csFactories
- the factories for creatingCoordinateSystem
objects, or null if none.datumFactories
- the factories for creatingDatum
objects, or null if none.copFactories
- the factories for creatingCoordinateOperation
objects, or null if none.
-
-
Method Details
-
isLenient
public boolean isLenient()Returns whether this factory should relax some rules when processing a given authority code. If this value istrue
, then the behavior of thisMultiAuthoritiesFactory
is changed as below:- If a version is specified in a URN but there is no factory for that specific version, then fallback on a factory for the same authority but the default version.
false
, which means that an exception will be thrown if there is no factory specifically for the requested version.- Returns:
- whether this factory should relax some rules when processing a given authority code.
-
setLenient
public void setLenient(boolean lenient) Sets whether this factory should relax some rules when processing a given code.- Parameters:
lenient
- whether this factory should relax some rules when processing a given authority code.
-
getAuthority
Returns the database or specification that defines the codes recognized by this factory. The default implementation returnsnull
sinceMultiAuthoritiesFactory
is not about a particular authority.- Specified by:
getAuthority
in interfaceAuthorityFactory
- Specified by:
getAuthority
in classGeodeticAuthorityFactory
- Returns:
- the organization responsible for definition of the database, or
null
if unknown. - See Also:
-
getAuthorityCodes
public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type) throws FactoryException Returns the set of authority codes for objects of the given type. This method returns the union of codes returned by all factories specified at construction time.The
Set.contains(Object)
method of the returned set is lenient: it accepts various ways to format a code even if the iterator returns only one form. For example, thecontains(Object)
method may returntrue
for"EPSG:4326"
,"EPSG::4326"
,"urn:ogc:def:crs:EPSG::4326"
, etc. even if the iterator returns only"EPSG:4326"
.Warnings:
- Callers should not retain a reference to the returned collection for a long time, since it may be backed by database connections (depending on the factory implementations).
- The returned set is not thread-safe. Each thread should ask its own instance and let the garbage collector disposes it as soon as the collection is not needed anymore.
- Call to the
Set.size()
method on the returned collection should be avoided since it may be costly.
- Specified by:
getAuthorityCodes
in interfaceAuthorityFactory
- Parameters:
type
- the spatial reference objects type.- Returns:
- the set of authority codes for spatial reference objects of the given type.
- Throws:
FactoryException
- if access to an underlying factory failed.
-
getCodeSpaces
Returns the code spaces of all factories given to the constructor.Performance note
The current implementation may be relatively costly because it implies instantiation of all factories.- Overrides:
getCodeSpaces
in classGeodeticAuthorityFactory
- Returns:
- the code spaces of all factories.
-
getAuthorityFactory
public final <T extends AuthorityFactory> T getAuthorityFactory(Class<T> type, String authority, String version) throws NoSuchAuthorityFactoryException Returns the factory identified by the given type, authority and version.- Type Parameters:
T
- the compile-time value oftype
.- Parameters:
type
- the type of the desired factory as one of theCRSAuthorityFactory
,CSAuthorityFactory
,DatumAuthorityFactory
orCoordinateOperationFactory
interfaces.authority
- the namespace or authority identifier of the desired factory. Examples:"EPSG"
,"CRS"
or"AUTO2"
.version
- the version of the desired factory, ornull
for the default version.- Returns:
- the factory for the given type, authority and version.
- Throws:
NoSuchAuthorityFactoryException
- if no suitable factory has been found.
-
getDescriptionText
Returns a description of the object corresponding to a code. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:
type:
authority:
version:
codehttp://www.opengis.net/def/
type/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
getDescriptionText
in interfaceAuthorityFactory
- Overrides:
getDescriptionText
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- a description of the object, or
null
if the object corresponding to the specifiedcode
has no description. - Throws:
FactoryException
- if an error occurred while fetching the description.
- authority
-
createObject
Creates an arbitrary object from a code. The given code can use any of the following patterns, where version is optional:- authority
:
code — note that this form is ambiguous - authority
:
version:
code — note that this form is ambiguous urn:ogc:def:
type:
authority:
version:
codehttp://www.opengis.net/def/
type/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
createObject(String)
method because different kinds of objects can have the same code.- Specified by:
createObject
in interfaceAuthorityFactory
- Specified by:
createObject
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the object for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createCoordinateReferenceSystem
public CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws FactoryException Creates an arbitrary coordinate reference system from a code. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createCoordinateReferenceSystem
in interfaceCRSAuthorityFactory
- Overrides:
createCoordinateReferenceSystem
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createGeographicCRS
Creates a 2- or 3-dimensional coordinate reference system based on an ellipsoidal approximation of the geoid. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createGeographicCRS
in interfaceCRSAuthorityFactory
- Overrides:
createGeographicCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createGeocentricCRS
Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createGeocentricCRS
in interfaceCRSAuthorityFactory
- Overrides:
createGeocentricCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createProjectedCRS
Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createProjectedCRS
in interfaceCRSAuthorityFactory
- Overrides:
createProjectedCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createVerticalCRS
Creates a 1-dimensional coordinate reference system used for recording heights or depths. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createVerticalCRS
in interfaceCRSAuthorityFactory
- Overrides:
createVerticalCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createTemporalCRS
Creates a 1-dimensional coordinate reference system used for the recording of time. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createTemporalCRS
in interfaceCRSAuthorityFactory
- Overrides:
createTemporalCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createCompoundCRS
Creates a CRS describing the position of points through two or more independent coordinate reference systems. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createCompoundCRS
in interfaceCRSAuthorityFactory
- Overrides:
createCompoundCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createDerivedCRS
Creates a CRS that is defined by its coordinate conversion from another CRS (not by a datum). The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createDerivedCRS
in interfaceCRSAuthorityFactory
- Overrides:
createDerivedCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createEngineeringCRS
Creates a 1-, 2- or 3-dimensional contextually local coordinate reference system. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createEngineeringCRS
in interfaceCRSAuthorityFactory
- Overrides:
createEngineeringCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createImageCRS
Creates a 2-dimensional engineering coordinate reference system applied to locations in images. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:crs:
authority:
version:
codehttp://www.opengis.net/def/crs/
authority/
version/
codehttp://www.opengis.net/gml/srs/
authority.xml#
code
- Specified by:
createImageCRS
in interfaceCRSAuthorityFactory
- Overrides:
createImageCRS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createDatum
Creates an arbitrary datum from a code. The returned object will typically be an The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:datum:
authority:
version:
codehttp://www.opengis.net/def/datum/
authority/
version/
code
- Specified by:
createDatum
in interfaceDatumAuthorityFactory
- Overrides:
createDatum
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createGeodeticDatum
Creates a datum defining the location and orientation of an ellipsoid that approximates the shape of the earth. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:datum:
authority:
version:
codehttp://www.opengis.net/def/datum/
authority/
version/
code
- Specified by:
createGeodeticDatum
in interfaceDatumAuthorityFactory
- Overrides:
createGeodeticDatum
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createVerticalDatum
Creates a datum identifying a particular reference level surface used as a zero-height surface. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:datum:
authority:
version:
codehttp://www.opengis.net/def/datum/
authority/
version/
code
- Specified by:
createVerticalDatum
in interfaceDatumAuthorityFactory
- Overrides:
createVerticalDatum
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createTemporalDatum
Creates a datum defining the origin of a temporal coordinate reference system. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:datum:
authority:
version:
codehttp://www.opengis.net/def/datum/
authority/
version/
code
- Specified by:
createTemporalDatum
in interfaceDatumAuthorityFactory
- Overrides:
createTemporalDatum
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createEngineeringDatum
Creates a datum defining the origin of an engineering coordinate reference system. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:datum:
authority:
version:
codehttp://www.opengis.net/def/datum/
authority/
version/
code
- Specified by:
createEngineeringDatum
in interfaceDatumAuthorityFactory
- Overrides:
createEngineeringDatum
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createImageDatum
Creates a datum defining the origin of an image coordinate reference system. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:datum:
authority:
version:
codehttp://www.opengis.net/def/datum/
authority/
version/
code
- Specified by:
createImageDatum
in interfaceDatumAuthorityFactory
- Overrides:
createImageDatum
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createEllipsoid
Creates a geometric figure that can be used to describe the approximate shape of the earth. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:ellipsoid:
authority:
version:
codehttp://www.opengis.net/def/ellipsoid/
authority/
version/
code
- Specified by:
createEllipsoid
in interfaceDatumAuthorityFactory
- Overrides:
createEllipsoid
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the ellipsoid for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createPrimeMeridian
Creates a prime meridian defining the origin from which longitude values are determined. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:meridian:
authority:
version:
codehttp://www.opengis.net/def/meridian/
authority/
version/
code
- Specified by:
createPrimeMeridian
in interfaceDatumAuthorityFactory
- Overrides:
createPrimeMeridian
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the prime meridian for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createExtent
Creates information about spatial, vertical, and temporal extent (usually a domain of validity) from a code. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code
- Overrides:
createExtent
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the extent for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createCoordinateSystem
Creates an arbitrary coordinate system from a code. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:cs:
authority:
version:
codehttp://www.opengis.net/def/cs/
authority/
version/
code
- Specified by:
createCoordinateSystem
in interfaceCSAuthorityFactory
- Overrides:
createCoordinateSystem
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createEllipsoidalCS
Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometimes with ellipsoidal height. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:cs:
authority:
version:
codehttp://www.opengis.net/def/cs/
authority/
version/
code
- Specified by:
createEllipsoidalCS
in interfaceCSAuthorityFactory
- Overrides:
createEllipsoidalCS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createVerticalCS
Creates a 1-dimensional coordinate system for heights or depths of points. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:cs:
authority:
version:
codehttp://www.opengis.net/def/cs/
authority/
version/
code
- Specified by:
createVerticalCS
in interfaceCSAuthorityFactory
- Overrides:
createVerticalCS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createTimeCS
Creates a 1-dimensional coordinate system for heights or depths of points. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:cs:
authority:
version:
codehttp://www.opengis.net/def/cs/
authority/
version/
code
- Specified by:
createTimeCS
in interfaceCSAuthorityFactory
- Overrides:
createTimeCS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createCartesianCS
Creates a 2- or 3-dimensional Cartesian coordinate system made of straight orthogonal axes. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:cs:
authority:
version:
codehttp://www.opengis.net/def/cs/
authority/
version/
code
- Specified by:
createCartesianCS
in interfaceCSAuthorityFactory
- Overrides:
createCartesianCS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createSphericalCS
Creates a 3-dimensional coordinate system with one distance measured from the origin and two angular coordinates. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:cs:
authority:
version:
codehttp://www.opengis.net/def/cs/
authority/
version/
code
- Specified by:
createSphericalCS
in interfaceCSAuthorityFactory
- Overrides:
createSphericalCS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createCylindricalCS
Creates a 3-dimensional coordinate system made of a polar coordinate system extended by a straight perpendicular axis. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:cs:
authority:
version:
codehttp://www.opengis.net/def/cs/
authority/
version/
code
- Specified by:
createCylindricalCS
in interfaceCSAuthorityFactory
- Overrides:
createCylindricalCS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createPolarCS
Creates a 2-dimensional coordinate system for coordinates represented by a distance from the origin and an angle from a fixed direction. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:cs:
authority:
version:
codehttp://www.opengis.net/def/cs/
authority/
version/
code
- Specified by:
createPolarCS
in interfaceCSAuthorityFactory
- Overrides:
createPolarCS
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createCoordinateSystemAxis
Creates a coordinate system axis with name, direction, unit and range of values. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:axis:
authority:
version:
codehttp://www.opengis.net/def/axis/
authority/
version/
code
- Specified by:
createCoordinateSystemAxis
in interfaceCSAuthorityFactory
- Overrides:
createCoordinateSystemAxis
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the axis for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createUnit
Creates an unit of measurement from a code. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:uom:
authority:
version:
codehttp://www.opengis.net/def/uom/
authority/
version/
code
- Specified by:
createUnit
in interfaceCSAuthorityFactory
- Overrides:
createUnit
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the unit of measurement for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createParameterDescriptor
Creates a definition of a single parameter used by an operation method. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:parameter:
authority:
version:
codehttp://www.opengis.net/def/parameter/
authority/
version/
code
- Overrides:
createParameterDescriptor
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the parameter descriptor for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createOperationMethod
Creates a description of the algorithm and parameters used to perform a coordinate operation. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:method:
authority:
version:
codehttp://www.opengis.net/def/method/
authority/
version/
code
- Specified by:
createOperationMethod
in interfaceCoordinateOperationAuthorityFactory
- Overrides:
createOperationMethod
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the operation method for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createCoordinateOperation
Creates an operation for transforming coordinates in the source CRS to coordinates in the target CRS. The given code can use any of the following patterns, where version is optional:- authority
:
code - authority
:
version:
code urn:ogc:def:coordinateOperation:
authority:
version:
codehttp://www.opengis.net/def/coordinateOperation/
authority/
version/
code
- Specified by:
createCoordinateOperation
in interfaceCoordinateOperationAuthorityFactory
- Overrides:
createCoordinateOperation
in classGeodeticAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the operation for the given code.
- Throws:
FactoryException
- if the object creation failed.- See Also:
- authority
-
createFromCoordinateReferenceSystemCodes
public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS) throws FactoryException Creates operations from source and target coordinate reference system codes. If the authority for the two given CRS is handled by the same factory, then this method delegates to that factory. Otherwise this method returns an empty set.- Specified by:
createFromCoordinateReferenceSystemCodes
in interfaceCoordinateOperationAuthorityFactory
- Overrides:
createFromCoordinateReferenceSystemCodes
in classGeodeticAuthorityFactory
- Parameters:
sourceCRS
- coded value of source coordinate reference system.targetCRS
- coded value of target coordinate reference system.- Returns:
- the operations from
sourceCRS
totargetCRS
. - Throws:
FactoryException
- if the object creation failed.
-
newIdentifiedObjectFinder
Creates a finder which can be used for looking up unidentified objects. The default implementation delegates the lookups to the underlying factories.- Overrides:
newIdentifiedObjectFinder
in classGeodeticAuthorityFactory
- Returns:
- a finder to use for looking up unidentified objects.
- Throws:
FactoryException
- if the finder cannot be created.- See Also:
-
reload
public void reload()Clears the cache and notifies thisMultiAuthoritiesFactory
that all factories will need to be fetched again from the providers given at construction time. In addition, all providers that are instances ofServiceLoader
will have theirreload()
method invoked.This method is intended for use in situations in which new factories can be installed into a running Java virtual machine.
-