Class MultiAuthoritiesFactory
- Object
-
- AbstractFactory
-
- GeodeticAuthorityFactory
-
- MultiAuthoritiesFactory
-
- All Implemented Interfaces:
AuthorityFactory
,CRSAuthorityFactory
,CSAuthorityFactory
,DatumAuthorityFactory
,CoordinateOperationAuthorityFactory
,Factory
public class MultiAuthoritiesFactory extends GeodeticAuthorityFactory implements CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory
A factory that delegates the object creation to another factory determined from the authority part in “authority:code” arguments. The list of factories to use as delegates can be specified at construction time.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 acreateFoo(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 aNoSuchAuthorityFactoryException
is thrown.URI syntaxThis 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: ifThis class accepts also combined URIs of the following forms (only two components shown, but arbitrary number of components is allowed):createObject("urn:ogc:def:crs:EPSG::4326")
is invoked, thenMultiAuthoritiesFactory
will delegate (indirectly, ignoring caching for this example) the object creation toEPSGDataAccess.createCoordinateReferenceSystem(String)
instead ofEPSGDataAccess.createObject(String)
because of the"crs"
part in the URN. The more specific method gives better performances and avoid ambiguities."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
invokescreateObject(String)
for each component and combines the result as described by theCRS.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 authorityMultiAuthoritiesFactory
accepts an arbitrary amount of factories for the same authority, provided that those factories have different version numbers. If acreateFoo(String)
method is invoked with a URN containing a version number different than zero, thenMultiAuthoritiesFactory
will search for a factory with that exact version, or throw aNoSuchAuthorityFactoryException
if no suitable factory is found. If acreateFoo(String)
method is invoked with the version number omitted, thenMultiAuthoritiesFactory
will use the first factory in iteration order for the requested authority regardless of its version number.Example: aMultiAuthoritiesFactory
instance could contain twoEPSGFactory
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 tocreateFoo(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-threadingThis 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:
CRS.getAuthorityFactory(String)
Defined in the
sis-referencing
module
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CartesianCS
createCartesianCS(String code)
Creates a 2- or 3-dimensional Cartesian coordinate system made of straight orthogonal axes.CompoundCRS
createCompoundCRS(String code)
Creates a CRS describing the position of points through two or more independent coordinate reference systems.CoordinateOperation
createCoordinateOperation(String code)
Creates an operation for transforming coordinates in the source CRS to coordinates in the target CRS.CoordinateReferenceSystem
createCoordinateReferenceSystem(String code)
Creates an arbitrary coordinate reference system from a code.CoordinateSystem
createCoordinateSystem(String code)
Creates an arbitrary coordinate system from a code.CoordinateSystemAxis
createCoordinateSystemAxis(String code)
Creates a coordinate system axis with name, direction, unit and range of values.CylindricalCS
createCylindricalCS(String code)
Creates a 3-dimensional coordinate system made of a polar coordinate system extended by a straight perpendicular axis.Datum
createDatum(String code)
Creates an arbitrary datum from a code.DerivedCRS
createDerivedCRS(String code)
Creates a CRS that is defined by its coordinate conversion from another CRS (not by a datum).Ellipsoid
createEllipsoid(String code)
Creates a geometric figure that can be used to describe the approximate shape of the earth.EllipsoidalCS
createEllipsoidalCS(String code)
Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometime with ellipsoidal height.EngineeringCRS
createEngineeringCRS(String code)
Creates a 1-, 2- or 3-dimensional contextually local coordinate reference system.EngineeringDatum
createEngineeringDatum(String code)
Creates a datum defining the origin of an engineering coordinate reference system.Extent
createExtent(String code)
Creates information about spatial, vertical, and temporal extent (usually a domain of validity) from a code.Set<CoordinateOperation>
createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS)
Creates operations from source and target coordinate reference system codes.GeocentricCRS
createGeocentricCRS(String code)
Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth.GeodeticDatum
createGeodeticDatum(String code)
Creates a datum defining the location and orientation of an ellipsoid that approximates the shape of the earth.GeographicCRS
createGeographicCRS(String code)
Creates a 2- or 3-dimensional coordinate reference system based on an ellipsoidal approximation of the geoid.ImageCRS
createImageCRS(String code)
Creates a 2-dimensional engineering coordinate reference system applied to locations in images.ImageDatum
createImageDatum(String code)
Creates a datum defining the origin of an image coordinate reference system.IdentifiedObject
createObject(String code)
Creates an arbitrary object from a code.OperationMethod
createOperationMethod(String code)
Creates a description of the algorithm and parameters used to perform a coordinate operation.ParameterDescriptor<?>
createParameterDescriptor(String code)
Creates a definition of a single parameter used by an operation method.PolarCS
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.PrimeMeridian
createPrimeMeridian(String code)
Creates a prime meridian defining the origin from which longitude values are determined.ProjectedCRS
createProjectedCRS(String code)
Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface.SphericalCS
createSphericalCS(String code)
Creates a 3-dimensional coordinate system with one distance measured from the origin and two angular coordinates.TemporalCRS
createTemporalCRS(String code)
Creates a 1-dimensional coordinate reference system used for the recording of time.TemporalDatum
createTemporalDatum(String code)
Creates a datum defining the origin of a temporal coordinate reference system.TimeCS
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.VerticalCRS
createVerticalCRS(String code)
Creates a 1-dimensional coordinate reference system used for recording heights or depths.VerticalCS
createVerticalCS(String code)
Creates a 1-dimensional coordinate system for heights or depths of points.VerticalDatum
createVerticalDatum(String code)
Creates a datum identifying a particular reference level surface used as a zero-height surface.Citation
getAuthority()
Returns the database or specification that defines the codes recognized by this factory.Set<String>
getAuthorityCodes(Class<? extends IdentifiedObject> type)
Returns the set of authority codes for objects of the given type.<T extends AuthorityFactory>
TgetAuthorityFactory(Class<T> type, String authority, String version)
Returns the factory identified by the given type, authority and version.Set<String>
getCodeSpaces()
Returns the code spaces of all factories given to the constructor.InternationalString
getDescriptionText(String code)
Returns a description of the object corresponding to a code.boolean
isLenient()
Returns whether this factory should relax some rules when processing a given authority code.IdentifiedObjectFinder
newIdentifiedObjectFinder()
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 Detail
-
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.RequirementsMultiAuthoritiesFactory
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 collisionIf 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.CachingMultiAuthoritiesFactory
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 Detail
-
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
public Citation 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:
AbstractFactory.getVendor()
-
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
public Set<String> getCodeSpaces()
Returns the code spaces of all factories given to the constructor.Implementation note: the current implementation may be relatively costly since 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
public InternationalString getDescriptionText(String code) throws FactoryException
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
public IdentifiedObject createObject(String code) throws FactoryException
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:
AbstractIdentifiedObject
- 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:
AbstractCRS
,CRS.forCode(String)
- authority
-
createGeographicCRS
public GeographicCRS createGeographicCRS(String code) throws FactoryException
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:
DefaultGeographicCRS
,CommonCRS.geographic()
,CommonCRS.geographic3D()
- authority
-
createGeocentricCRS
public GeocentricCRS createGeocentricCRS(String code) throws FactoryException
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:
DefaultGeocentricCRS
,CommonCRS.geocentric()
- authority
-
createProjectedCRS
public ProjectedCRS createProjectedCRS(String code) throws FactoryException
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:
DefaultProjectedCRS
- authority
-
createVerticalCRS
public VerticalCRS createVerticalCRS(String code) throws FactoryException
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:
DefaultVerticalCRS
,CommonCRS.Vertical.crs()
- authority
-
createTemporalCRS
public TemporalCRS createTemporalCRS(String code) throws FactoryException
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:
DefaultTemporalCRS
,CommonCRS.Temporal.crs()
- authority
-
createCompoundCRS
public CompoundCRS createCompoundCRS(String code) throws FactoryException
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:
DefaultCompoundCRS
- authority
-
createDerivedCRS
public DerivedCRS createDerivedCRS(String code) throws FactoryException
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:
DefaultDerivedCRS
- authority
-
createEngineeringCRS
public EngineeringCRS createEngineeringCRS(String code) throws FactoryException
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:
DefaultEngineeringCRS
- authority
-
createImageCRS
public ImageCRS createImageCRS(String code) throws FactoryException
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:
DefaultImageCRS
- authority
-
createDatum
public Datum createDatum(String code) throws FactoryException
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:
AbstractDatum
- authority
-
createGeodeticDatum
public GeodeticDatum createGeodeticDatum(String code) throws FactoryException
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:
DefaultGeodeticDatum
,CommonCRS.datum()
- authority
-
createVerticalDatum
public VerticalDatum createVerticalDatum(String code) throws FactoryException
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:
DefaultVerticalDatum
,CommonCRS.Vertical.datum()
- authority
-
createTemporalDatum
public TemporalDatum createTemporalDatum(String code) throws FactoryException
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:
DefaultTemporalDatum
,CommonCRS.Temporal.datum()
- authority
-
createEngineeringDatum
public EngineeringDatum createEngineeringDatum(String code) throws FactoryException
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:
DefaultEngineeringDatum
- authority
-
createImageDatum
public ImageDatum createImageDatum(String code) throws FactoryException
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:
DefaultImageDatum
- authority
-
createEllipsoid
public Ellipsoid createEllipsoid(String code) throws FactoryException
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:
DefaultEllipsoid
,CommonCRS.ellipsoid()
- authority
-
createPrimeMeridian
public PrimeMeridian createPrimeMeridian(String code) throws FactoryException
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:
DefaultPrimeMeridian
,CommonCRS.primeMeridian()
- authority
-
createExtent
public Extent createExtent(String code) throws FactoryException
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:
DefaultExtent
- authority
-
createCoordinateSystem
public CoordinateSystem createCoordinateSystem(String code) throws FactoryException
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:
AbstractCS
,CoordinateSystems.getEpsgCode(Unit, AxisDirection...)
- authority
-
createEllipsoidalCS
public EllipsoidalCS createEllipsoidalCS(String code) throws FactoryException
Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometime 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:
DefaultEllipsoidalCS
- authority
-
createVerticalCS
public VerticalCS createVerticalCS(String code) throws FactoryException
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:
DefaultVerticalCS
- authority
-
createTimeCS
public TimeCS createTimeCS(String code) throws FactoryException
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:
DefaultTimeCS
- authority
-
createCartesianCS
public CartesianCS createCartesianCS(String code) throws FactoryException
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:
DefaultCartesianCS
- authority
-
createSphericalCS
public SphericalCS createSphericalCS(String code) throws FactoryException
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:
DefaultSphericalCS
- authority
-
createCylindricalCS
public CylindricalCS createCylindricalCS(String code) throws FactoryException
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:
DefaultCylindricalCS
- authority
-
createPolarCS
public PolarCS createPolarCS(String code) throws FactoryException
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:
DefaultPolarCS
- authority
-
createCoordinateSystemAxis
public CoordinateSystemAxis createCoordinateSystemAxis(String code) throws FactoryException
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:
DefaultCoordinateSystemAxis
- authority
-
createUnit
public Unit<?> createUnit(String code) throws FactoryException
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:
Units.valueOfEPSG(int)
- authority
-
createParameterDescriptor
public ParameterDescriptor<?> createParameterDescriptor(String code) throws FactoryException
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:
DefaultParameterDescriptor
, Apache SIS™ Coordinate Operation Methods
- authority
-
createOperationMethod
public OperationMethod createOperationMethod(String code) throws FactoryException
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:
DefaultOperationMethod
, Apache SIS™ Coordinate Operation Methods
- authority
-
createCoordinateOperation
public CoordinateOperation createCoordinateOperation(String code) throws FactoryException
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:
AbstractCoordinateOperation
- 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
public IdentifiedObjectFinder newIdentifiedObjectFinder() throws FactoryException
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 can not be created.- See Also:
IdentifiedObjects.newFinder(String)
-
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.
-
-