Class MultiAuthoritiesFactory

All Implemented Interfaces:
org.opengis.referencing.AuthorityFactory, org.opengis.referencing.crs.CRSAuthorityFactory, org.opengis.referencing.cs.CSAuthorityFactory, org.opengis.referencing.datum.DatumAuthorityFactory, org.opengis.referencing.operation.CoordinateOperationAuthorityFactory, org.opengis.util.Factory

public class MultiAuthoritiesFactory extends GeodeticAuthorityFactory implements org.opengis.referencing.crs.CRSAuthorityFactory, org.opengis.referencing.cs.CSAuthorityFactory, org.opengis.referencing.datum.DatumAuthorityFactory, org.opengis.referencing.operation.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 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"
In such cases, the type specified in the URN may be used for invoking a more specific method. However, 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: if createObject("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.
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₂"
Given such URIs, 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: a MultiAuthoritiesFactory 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 as Iterable instances, do not need to be thread-safe. See constructor Javadoc for more information.
Since:
0.7
Version:
1.2
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static final class 
    A proxy that does not execute immediately the create method on a factory, but instead stores information for later execution.
    private static class 
    A IdentifiedObjectFinder which tests every factories declared in the collection of factories.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Set<String>
    The code spaces of all factories given to the constructor, created when first requested.
    private final ConcurrentMap<AuthorityFactoryIdentifier,org.opengis.referencing.AuthorityFactory>
    The factories obtained from getAuthorityFactory(Class, String, String) and similar methods.
    private final AtomicInteger
    A bit masks identifying which providers have given us all their factories.
    private boolean
    Whether this factory should relax some rules when processing a given authority code.
    private final Iterable<? extends org.opengis.referencing.AuthorityFactory>[]
    The factory providers given at construction time.
    The factories for which we have logged a warning.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MultiAuthoritiesFactory(Iterable<? extends org.opengis.referencing.crs.CRSAuthorityFactory> crsFactories, Iterable<? extends org.opengis.referencing.cs.CSAuthorityFactory> csFactories, Iterable<? extends org.opengis.referencing.datum.DatumAuthorityFactory> datumFactories, Iterable<? extends org.opengis.referencing.operation.CoordinateOperationAuthorityFactory> copFactories)
    Creates a new multi-factories instance using the given lists of factories.
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    applyAndMask(int mask)
    Sets isIterationCompleted to iterationCompleted & mask.
    private org.opengis.referencing.AuthorityFactory
    cache(AuthorityFactoryIdentifier identifier, org.opengis.referencing.AuthorityFactory factory)
    Caches the given factory, but without replacing existing instance if any.
    private boolean
    Returns true if this MultiAuthoritiesFactory can log a warning for the given factory.
    private <T> T
    combine(Class<T> type, DefinitionURI[] references, boolean isHTTP)
    Invoked when a createFoo(…) method is given a combined URI.
    private static org.opengis.referencing.crs.GeneralDerivedCRS
    combine(org.opengis.referencing.crs.CoordinateReferenceSystem baseCRS, org.opengis.referencing.operation.Conversion fromBase, org.opengis.referencing.cs.CoordinateSystem cs)
    Invoked when a createFoo(…) method is given a combined URI containing a conversion and a coordinate system.
    private static org.opengis.referencing.crs.GeodeticCRS
    combine(org.opengis.referencing.datum.GeodeticDatum datum, org.opengis.referencing.cs.CoordinateSystem cs)
    Invoked when a createFoo(…) method is given a combined URI containing a datum and a coordinate system.
    private <T> T
    create(AuthorityFactoryProxy<? extends T> proxy, String code)
    Creates an object from a code using the given proxy.
    org.opengis.referencing.cs.CartesianCS
    Creates a 2- or 3-dimensional Cartesian coordinate system made of straight orthogonal axes.
    org.opengis.referencing.crs.CompoundCRS
    Creates a CRS describing the position of points through two or more independent coordinate reference systems.
    org.opengis.referencing.operation.CoordinateOperation
    Creates an operation for transforming coordinates in the source CRS to coordinates in the target CRS.
    org.opengis.referencing.crs.CoordinateReferenceSystem
    Creates an arbitrary coordinate reference system from a code.
    org.opengis.referencing.cs.CoordinateSystem
    Creates an arbitrary coordinate system from a code.
    org.opengis.referencing.cs.CoordinateSystemAxis
    Creates a coordinate system axis with name, direction, unit and range of values.
    org.opengis.referencing.cs.CylindricalCS
    Creates a 3-dimensional coordinate system made of a polar coordinate system extended by a straight perpendicular axis.
    org.opengis.referencing.datum.Datum
    Creates an arbitrary datum from a code.
    org.opengis.referencing.crs.DerivedCRS
    Creates a CRS that is defined by its coordinate conversion from another CRS (not by a datum).
    org.opengis.referencing.datum.Ellipsoid
    Creates a geometric figure that can be used to describe the approximate shape of the earth.
    org.opengis.referencing.cs.EllipsoidalCS
    Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometimes with ellipsoidal height.
    org.opengis.referencing.crs.EngineeringCRS
    Creates a 1-, 2- or 3-dimensional contextually local coordinate reference system.
    org.opengis.referencing.datum.EngineeringDatum
    Creates a datum defining the origin of an engineering coordinate reference system.
    org.opengis.metadata.extent.Extent
    Creates information about spatial, vertical, and temporal extent (usually a domain of validity) from a code.
    Set<org.opengis.referencing.operation.CoordinateOperation>
    Creates operations from source and target coordinate reference system codes.
    org.opengis.referencing.crs.GeocentricCRS
    Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth.
    org.opengis.referencing.datum.GeodeticDatum
    Creates a datum defining the location and orientation of an ellipsoid that approximates the shape of the earth.
    org.opengis.referencing.crs.GeographicCRS
    Creates a 2- or 3-dimensional coordinate reference system based on an ellipsoidal approximation of the geoid.
    org.opengis.referencing.crs.ImageCRS
    Creates a 2-dimensional engineering coordinate reference system applied to locations in images.
    org.opengis.referencing.datum.ImageDatum
    Creates a datum defining the origin of an image coordinate reference system.
    org.opengis.referencing.IdentifiedObject
    Creates an arbitrary object from a code.
    org.opengis.referencing.operation.OperationMethod
    Creates a description of the algorithm and parameters used to perform a coordinate operation.
    org.opengis.parameter.ParameterDescriptor<?>
    Creates a definition of a single parameter used by an operation method.
    org.opengis.referencing.cs.PolarCS
    Creates a 2-dimensional coordinate system for coordinates represented by a distance from the origin and an angle from a fixed direction.
    org.opengis.referencing.datum.PrimeMeridian
    Creates a prime meridian defining the origin from which longitude values are determined.
    org.opengis.referencing.crs.ProjectedCRS
    Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface.
    org.opengis.referencing.cs.SphericalCS
    Creates a 3-dimensional coordinate system with one distance measured from the origin and two angular coordinates.
    org.opengis.referencing.crs.TemporalCRS
    Creates a 1-dimensional coordinate reference system used for the recording of time.
    org.opengis.referencing.datum.TemporalDatum
    Creates a datum defining the origin of a temporal coordinate reference system.
    org.opengis.referencing.cs.TimeCS
    Creates a 1-dimensional coordinate system for heights or depths of points.
    javax.measure.Unit<?>
    Creates an unit of measurement from a code.
    org.opengis.referencing.crs.VerticalCRS
    Creates a 1-dimensional coordinate reference system used for recording heights or depths.
    org.opengis.referencing.cs.VerticalCS
    Creates a 1-dimensional coordinate system for heights or depths of points.
    org.opengis.referencing.datum.VerticalDatum
    Creates a datum identifying a particular reference level surface used as a zero-height surface.
    (package private) final Iterator<org.opengis.referencing.AuthorityFactory>
    Returns an iterator over all factories in this MultiAuthoritiesFactory.
    org.opengis.metadata.citation.Citation
    Returns the database or specification that defines the codes recognized by this factory.
    getAuthorityCodes(Class<? extends org.opengis.referencing.IdentifiedObject> type)
    Returns the set of authority codes for objects of the given type.
    final <T extends org.opengis.referencing.AuthorityFactory>
    T
    getAuthorityFactory(Class<T> type, String authority, String version)
    Returns the factory identified by the given type, authority and version.
    private org.opengis.referencing.AuthorityFactory
    Returns the factory identified by the given type, authority and version.
    (package private) static String
    getCodeSpace(org.opengis.referencing.AuthorityFactory factory)
    Returns the "main" namespace of the given factory, or null if none.
    Returns the code spaces of all factories given to the constructor.
    private static Set<String>
    getCodeSpaces(org.opengis.referencing.AuthorityFactory factory)
    Returns the code spaces for the given factory.
    org.opengis.util.InternationalString
    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
    Clears the cache and notifies this MultiAuthoritiesFactory that all factories will need to be fetched again from the providers given at construction time.
    private static <T> T
    remove(DefinitionURI[] references, org.opengis.referencing.IdentifiedObject[] components, Class<T> type)
    If the given type is found in the given references, sets that reference element to null and returns the corresponding components element.
    void
    setLenient(boolean lenient)
    Sets whether this factory should relax some rules when processing a given code.

    Methods inherited from class org.apache.sis.util.iso.AbstractFactory

    getVendor

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opengis.util.Factory

    getVendor
  • Field Details

    • providers

      private final Iterable<? extends org.opengis.referencing.AuthorityFactory>[] providers
      The factory providers given at construction time. Elements in the array are for CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory and CoordinateOperationAuthorityFactory in that order. That order is defined by the constant values in AuthorityFactoryIdentifier.

      Note that this array is shorter than the amount of AuthorityFactoryIdentifier values. The last AuthorityFactoryIdentifier values are handled in a special way.

      The array may contain null elements when there is no provider for a given type. Content of this array shall be immutable after construction time in order to avoid the need for synchronization when reading the array. However, usage of an Iterable element shall be synchronized on that Iterable.

    • factories

      private final ConcurrentMap<AuthorityFactoryIdentifier,org.opengis.referencing.AuthorityFactory> factories
      The factories obtained from getAuthorityFactory(Class, String, String) and similar methods.
    • isIterationCompleted

      private final AtomicInteger isIterationCompleted
      A bit masks identifying which providers have given us all their factories. The value (1 << type) is set when MultiAuthoritiesFactory has iterated until the end of providers[type].iterator().
    • codeSpaces

      private volatile Set<String> codeSpaces
      The code spaces of all factories given to the constructor, created when first requested.
      See Also:
    • isLenient

      private volatile boolean isLenient
      Whether this factory should relax some rules when processing a given authority code. See isLenient() javadoc for a description of relaxed rules.
      See Also:
    • warnings

      private final Map<AuthorityFactoryIdentifier,Boolean> warnings
      The factories for which we have logged a warning. This is used in order to avoid logging the same warnings many time. We do not bother using a concurrent map here since this map should be rarely used.
  • Constructor Details

    • MultiAuthoritiesFactory

      public MultiAuthoritiesFactory(Iterable<? extends org.opengis.referencing.crs.CRSAuthorityFactory> crsFactories, Iterable<? extends org.opengis.referencing.cs.CSAuthorityFactory> csFactories, Iterable<? extends org.opengis.referencing.datum.DatumAuthorityFactory> datumFactories, Iterable<? extends org.opengis.referencing.operation.CoordinateOperationAuthorityFactory> copFactories)
      Creates a new multi-factories instance using the given lists of factories. Calls to createFoo(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 same Iterable more than once. Each iteration shall return the same instances than previous iterations, unless reload() has been invoked.

      The Iterables do not need to be thread-safe. MultiAuthoritiesFactory will use them only in blocks synchronized on the Iterable instance. For example, all usages of crsFactory will be done inside a synchronized(crsFactory) block.

      Name collision

      If an Iterable 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 given Iterables, 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 creating CoordinateReferenceSystem objects, or null if none.
      csFactories - the factories for creating CoordinateSystem objects, or null if none.
      datumFactories - the factories for creating Datum objects, or null if none.
      copFactories - the factories for creating CoordinateOperation 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 is true, then the behavior of this MultiAuthoritiesFactory 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.
      The default value is 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 org.opengis.metadata.citation.Citation getAuthority()
      Returns the database or specification that defines the codes recognized by this factory. The default implementation returns null since MultiAuthoritiesFactory is not about a particular authority.
      Specified by:
      getAuthority in interface org.opengis.referencing.AuthorityFactory
      Specified by:
      getAuthority in class GeodeticAuthorityFactory
      Returns:
      the organization responsible for definition of the database, or null if unknown.
      See Also:
    • getAuthorityCodes

      public Set<String> getAuthorityCodes(Class<? extends org.opengis.referencing.IdentifiedObject> type) throws org.opengis.util.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, the contains(Object) method may return true 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 interface org.opengis.referencing.AuthorityFactory
      Parameters:
      type - the spatial reference objects type.
      Returns:
      the set of authority codes for spatial reference objects of the given type.
      Throws:
      org.opengis.util.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 class GeodeticAuthorityFactory
      Returns:
      the code spaces of all factories.
    • getCodeSpaces

      private static Set<String> getCodeSpaces(org.opengis.referencing.AuthorityFactory factory)
      Returns the code spaces for the given factory. This method delegates to GeodeticAuthorityFactory.getCodeSpaces() if possible, or reproduces its default implementation otherwise.
    • getCodeSpace

      static String getCodeSpace(org.opengis.referencing.AuthorityFactory factory)
      Returns the "main" namespace of the given factory, or null if none. Current implementation returns the first namespace, but this may be changed in any future SIS version.

      The purpose of this method is to get a unique identifier of a factory, ignoring version number.

    • cache

      private org.opengis.referencing.AuthorityFactory cache(AuthorityFactoryIdentifier identifier, org.opengis.referencing.AuthorityFactory factory)
      Caches the given factory, but without replacing existing instance if any. This method returns the factory that we should use, either the given instance of the cached one.
      Parameters:
      identifier - the type, authority and version of the factory to cache.
      factory - the factory to cache.
      Returns:
      the given factory if no previous instance was cached, or the existing instance otherwise.
    • getAllFactories

      final Iterator<org.opengis.referencing.AuthorityFactory> getAllFactories()
      Returns an iterator over all factories in this MultiAuthoritiesFactory. Note that the same factory instance may be returned more than once if it implements more than one of the CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory or CoordinateOperationAuthorityFactory interfaces.

      This iterator takes care of synchronization on the Iterable<AuthorityFactory> instances. Note that despite the above-cited synchronization, the returned iterator is not thread-safe: each thread needs to use its own iterator instance. However, provided that the above condition is met, threads can safely use their iterators concurrently.

    • getAuthorityFactory

      public final <T extends org.opengis.referencing.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 of type.
      Parameters:
      type - the type of the desired factory as one of the CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory or CoordinateOperationFactory interfaces.
      authority - the namespace or authority identifier of the desired factory. Examples: "EPSG", "CRS" or "AUTO2".
      version - the version of the desired factory, or null for the default version.
      Returns:
      the factory for the given type, authority and version.
      Throws:
      NoSuchAuthorityFactoryException - if no suitable factory has been found.
    • getAuthorityFactory

      private org.opengis.referencing.AuthorityFactory getAuthorityFactory(AuthorityFactoryIdentifier request) throws NoSuchAuthorityFactoryException
      Returns the factory identified by the given type, authority and version. If no such factory is found in the cache, then this method iterates over the factories created by the providers given at construction time.
      Parameters:
      request - the type, authority and version of the desired factory.
      Returns:
      the factory for the given type, authority and version.
      Throws:
      NoSuchAuthorityFactoryException - if no suitable factory has been found.
    • canLog

      private boolean canLog(AuthorityFactoryIdentifier identifier)
      Returns true if this MultiAuthoritiesFactory can log a warning for the given factory.
    • create

      private <T> T create(AuthorityFactoryProxy<? extends T> proxy, String code) throws org.opengis.util.FactoryException
      Creates an object from a code using the given proxy.
      Type Parameters:
      T - the type of the object to be returned.
      Parameters:
      proxy - the proxy to use for creating the object.
      code - the code of the object to create.
      Returns:
      the object from one of the authority factory specified at construction time.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while creating the object.
    • getDescriptionText

      public org.opengis.util.InternationalString getDescriptionText(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/type/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      getDescriptionText in interface org.opengis.referencing.AuthorityFactory
      Overrides:
      getDescriptionText in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      a description of the object, or null if the object corresponding to the specified code has no description.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while fetching the description.
    • createObject

      public org.opengis.referencing.IdentifiedObject createObject(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/type/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      The two first formats are ambiguous when used with this createObject(String) method because different kinds of objects can have the same code.
      Specified by:
      createObject in interface org.opengis.referencing.AuthorityFactory
      Specified by:
      createObject in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the object for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createCoordinateReferenceSystem

      public org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createCoordinateReferenceSystem in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createCoordinateReferenceSystem in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createGeographicCRS

      public org.opengis.referencing.crs.GeographicCRS createGeographicCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createGeographicCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createGeographicCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createGeocentricCRS

      public org.opengis.referencing.crs.GeocentricCRS createGeocentricCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createGeocentricCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createGeocentricCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createProjectedCRS

      public org.opengis.referencing.crs.ProjectedCRS createProjectedCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createProjectedCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createProjectedCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createVerticalCRS

      public org.opengis.referencing.crs.VerticalCRS createVerticalCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createVerticalCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createVerticalCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createTemporalCRS

      public org.opengis.referencing.crs.TemporalCRS createTemporalCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createTemporalCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createTemporalCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createCompoundCRS

      public org.opengis.referencing.crs.CompoundCRS createCompoundCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createCompoundCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createCompoundCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createDerivedCRS

      public org.opengis.referencing.crs.DerivedCRS createDerivedCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createDerivedCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createDerivedCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createEngineeringCRS

      public org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createEngineeringCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createEngineeringCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createImageCRS

      public org.opengis.referencing.crs.ImageCRS createImageCRS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/crs/authority/version/code
      • http://www.opengis.net/gml/srs/authority.xml#code
      Specified by:
      createImageCRS in interface org.opengis.referencing.crs.CRSAuthorityFactory
      Overrides:
      createImageCRS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createDatum

      public org.opengis.referencing.datum.Datum createDatum(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/datum/authority/version/code
      Specified by:
      createDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
      Overrides:
      createDatum in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createGeodeticDatum

      public org.opengis.referencing.datum.GeodeticDatum createGeodeticDatum(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/datum/authority/version/code
      Specified by:
      createGeodeticDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
      Overrides:
      createGeodeticDatum in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createVerticalDatum

      public org.opengis.referencing.datum.VerticalDatum createVerticalDatum(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/datum/authority/version/code
      Specified by:
      createVerticalDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
      Overrides:
      createVerticalDatum in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createTemporalDatum

      public org.opengis.referencing.datum.TemporalDatum createTemporalDatum(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/datum/authority/version/code
      Specified by:
      createTemporalDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
      Overrides:
      createTemporalDatum in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createEngineeringDatum

      public org.opengis.referencing.datum.EngineeringDatum createEngineeringDatum(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/datum/authority/version/code
      Specified by:
      createEngineeringDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
      Overrides:
      createEngineeringDatum in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createImageDatum

      public org.opengis.referencing.datum.ImageDatum createImageDatum(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/datum/authority/version/code
      Specified by:
      createImageDatum in interface org.opengis.referencing.datum.DatumAuthorityFactory
      Overrides:
      createImageDatum in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createEllipsoid

      public org.opengis.referencing.datum.Ellipsoid createEllipsoid(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/ellipsoid/authority/version/code
      Specified by:
      createEllipsoid in interface org.opengis.referencing.datum.DatumAuthorityFactory
      Overrides:
      createEllipsoid in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the ellipsoid for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createPrimeMeridian

      public org.opengis.referencing.datum.PrimeMeridian createPrimeMeridian(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/meridian/authority/version/code
      Specified by:
      createPrimeMeridian in interface org.opengis.referencing.datum.DatumAuthorityFactory
      Overrides:
      createPrimeMeridian in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the prime meridian for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createExtent

      public org.opengis.metadata.extent.Extent createExtent(String code) throws org.opengis.util.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 class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the extent for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createCoordinateSystem

      public org.opengis.referencing.cs.CoordinateSystem createCoordinateSystem(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/cs/authority/version/code
      Specified by:
      createCoordinateSystem in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createCoordinateSystem in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createEllipsoidalCS

      public org.opengis.referencing.cs.EllipsoidalCS createEllipsoidalCS(String code) throws org.opengis.util.FactoryException
      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:code
      • http://www.opengis.net/def/cs/authority/version/code
      Specified by:
      createEllipsoidalCS in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createEllipsoidalCS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createVerticalCS

      public org.opengis.referencing.cs.VerticalCS createVerticalCS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/cs/authority/version/code
      Specified by:
      createVerticalCS in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createVerticalCS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createTimeCS

      public org.opengis.referencing.cs.TimeCS createTimeCS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/cs/authority/version/code
      Specified by:
      createTimeCS in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createTimeCS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createCartesianCS

      public org.opengis.referencing.cs.CartesianCS createCartesianCS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/cs/authority/version/code
      Specified by:
      createCartesianCS in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createCartesianCS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createSphericalCS

      public org.opengis.referencing.cs.SphericalCS createSphericalCS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/cs/authority/version/code
      Specified by:
      createSphericalCS in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createSphericalCS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createCylindricalCS

      public org.opengis.referencing.cs.CylindricalCS createCylindricalCS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/cs/authority/version/code
      Specified by:
      createCylindricalCS in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createCylindricalCS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createPolarCS

      public org.opengis.referencing.cs.PolarCS createPolarCS(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/cs/authority/version/code
      Specified by:
      createPolarCS in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createPolarCS in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createCoordinateSystemAxis

      public org.opengis.referencing.cs.CoordinateSystemAxis createCoordinateSystemAxis(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/axis/authority/version/code
      Specified by:
      createCoordinateSystemAxis in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createCoordinateSystemAxis in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the axis for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createUnit

      public javax.measure.Unit<?> createUnit(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/uom/authority/version/code
      Specified by:
      createUnit in interface org.opengis.referencing.cs.CSAuthorityFactory
      Overrides:
      createUnit in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the unit of measurement for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createParameterDescriptor

      public org.opengis.parameter.ParameterDescriptor<?> createParameterDescriptor(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/parameter/authority/version/code
      Overrides:
      createParameterDescriptor in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the parameter descriptor for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createOperationMethod

      public org.opengis.referencing.operation.OperationMethod createOperationMethod(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/method/authority/version/code
      Specified by:
      createOperationMethod in interface org.opengis.referencing.operation.CoordinateOperationAuthorityFactory
      Overrides:
      createOperationMethod in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the operation method for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createCoordinateOperation

      public org.opengis.referencing.operation.CoordinateOperation createCoordinateOperation(String code) throws org.opengis.util.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:code
      • http://www.opengis.net/def/coordinateOperation/authority/version/code
      Specified by:
      createCoordinateOperation in interface org.opengis.referencing.operation.CoordinateOperationAuthorityFactory
      Overrides:
      createCoordinateOperation in class GeodeticAuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the operation for the given code.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createFromCoordinateReferenceSystemCodes

      public Set<org.opengis.referencing.operation.CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS) throws org.opengis.util.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 interface org.opengis.referencing.operation.CoordinateOperationAuthorityFactory
      Overrides:
      createFromCoordinateReferenceSystemCodes in class GeodeticAuthorityFactory
      Parameters:
      sourceCRS - coded value of source coordinate reference system.
      targetCRS - coded value of target coordinate reference system.
      Returns:
      the operations from sourceCRS to targetCRS.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
    • combine

      private <T> T combine(Class<T> type, DefinitionURI[] references, boolean isHTTP) throws org.opengis.util.FactoryException
      Invoked when a createFoo(…) method is given a combined URI. A combined URI is a URN or URL referencing other components. For example if the given URI is "urn:ogc:def:crs, crs:EPSG::27700, crs:EPSG::5701", then the components are:
      1. "urn:ogc:def:crs:EPSG:9.1:27700"
      2. "urn:ogc:def:crs:EPSG:9.1:5701"
      We do not require the components to be instance of CRS, since the "Definition identifier URNs in OGC namespace" best practice paper allows other kinds of combination (e.g. of coordinate operations).
      Type Parameters:
      T - compile-time value of type argument.
      Parameters:
      type - type of object to create.
      references - parsed URI of the components.
      isHTTP - whether the user URI is an URL (i.e. "http://something") instead of a URN.
      Returns:
      the combined object.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while creating the combined object.
    • remove

      private static <T> T remove(DefinitionURI[] references, org.opengis.referencing.IdentifiedObject[] components, Class<T> type)
      If the given type is found in the given references, sets that reference element to null and returns the corresponding components element. Otherwise returns null. This is equivalent to Map.remove(Object, Object) where references are the keys and components are the values. We do not bother building that map because the arrays are very short (2 or 3 elements).
    • combine

      private static org.opengis.referencing.crs.GeodeticCRS combine(org.opengis.referencing.datum.GeodeticDatum datum, org.opengis.referencing.cs.CoordinateSystem cs) throws org.opengis.util.FactoryException
      Invoked when a createFoo(…) method is given a combined URI containing a datum and a coordinate system. If the given information are not sufficient or not applicable, then this method returns null.
      Parameters:
      datum - the datum, or null if missing.
      cs - the coordinate system (never null).
      Returns:
      the combined CRS, or null if the given information are not sufficient.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while creating the combined CRS.
    • combine

      private static org.opengis.referencing.crs.GeneralDerivedCRS combine(org.opengis.referencing.crs.CoordinateReferenceSystem baseCRS, org.opengis.referencing.operation.Conversion fromBase, org.opengis.referencing.cs.CoordinateSystem cs) throws org.opengis.util.FactoryException
      Invoked when a createFoo(…) method is given a combined URI containing a conversion and a coordinate system. If the given information are not sufficient or not applicable, then this method returns null.
      Parameters:
      baseCRS - the CRS on which the derived CRS will be based on, or null if missing.
      fromBase - the conversion from baseCRS to the CRS to be created by this method.
      cs - the coordinate system (never null).
      Returns:
      the combined CRS, or null if the given information are not sufficient.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while creating the combined CRS.
    • newIdentifiedObjectFinder

      public IdentifiedObjectFinder newIdentifiedObjectFinder() throws org.opengis.util.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 class GeodeticAuthorityFactory
      Returns:
      a finder to use for looking up unidentified objects.
      Throws:
      org.opengis.util.FactoryException - if the finder cannot be created.
      See Also:
    • reload

      public void reload()
      Clears the cache and notifies this MultiAuthoritiesFactory that all factories will need to be fetched again from the providers given at construction time. In addition, all providers that are instances of ServiceLoader will have their reload() method invoked.

      This method is intended for use in situations in which new factories can be installed into a running Java virtual machine.

    • applyAndMask

      private void applyAndMask(int mask)
      Sets isIterationCompleted to iterationCompleted & mask. This is used by reload() for clearing bits.