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
This factory requires that every codes given to a createFoo(String) method are prefixed by a namespace,
for example "EPSG:4326" or "EPSG::4326".
When a createFoo(String) method is invoked, this class uses the authority part in the
“authority:code” argument for locating a factory capable to create a geodetic object
for the code part. If a factory is found in the list of factories given at construction time,
then the work is delegated to that factory. Otherwise a NoSuchAuthorityFactoryException is thrown.
URI syntax
This factory can also parse URNs or URLs of the following forms:"urn:ogc:def:type:authority:version:code""http://www.opengis.net/def/type/authority/version/code""http://www.opengis.net/gml/srs/authority.xml#code"
MultiAuthoritiesFactory uses the type information in the URN only for
delegating to a more specific method, never for delegating to a less specific method.
An exception will be thrown if the type in the URN is incompatible with the invoked method.
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."urn:ogc:def:type,type₁:authority₁:version₁:code₁,type₂:authority₂:version₂:code₂""http://www.opengis.net/def/crs-compound?
1=http://www.opengis.net/def/crs/authority₁/version₁/code₁&
2=http://www.opengis.net/def/crs/authority₂/version₂/code₂"
MultiAuthoritiesFactory invokes createObject(String) for each component
and combines the result as described by the CRS.compound(CoordinateReferenceSystem...) method.
URNs (but not URLs) can also combine a
geodetic datum with an
ellipsoidal coordinate system for creating a new
geographic CRS, or a base geographic CRS with a
conversion and a
Cartesian coordinate system for creating a new
projected coordinate reference system, or
coordinate operations
for creating a concatenated operation.
Multiple versions for the same authority
MultiAuthoritiesFactory accepts an arbitrary number of factories for the same authority, provided that
those factories have different version numbers. If a createFoo(String) method is invoked with a URN
containing a version number different than zero, then MultiAuthoritiesFactory will search for a factory
with that exact version, or throw a NoSuchAuthorityFactoryException if no suitable factory is found.
If a createFoo(String) method is invoked with the version number omitted, then MultiAuthoritiesFactory
will use the first factory in iteration order for the requested authority regardless of its version number.
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 asIterable 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 ClassesModifier and TypeClassDescriptionprivate static final classA proxy that does not execute immediately thecreatemethod on a factory, but instead stores information for later execution.private static classAIdentifiedObjectFinderwhich tests every factories declared in the collection of factories. -
Field Summary
FieldsModifier and TypeFieldDescriptionThe code spaces of all factories given to the constructor, created when first requested.private final ConcurrentMap<AuthorityFactoryIdentifier,org.opengis.referencing.AuthorityFactory> The factories obtained fromgetAuthorityFactory(Class, String, String)and similar methods.private final AtomicIntegerA bit masks identifying which providers have given us all their factories.private booleanWhether 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.private final Map<AuthorityFactoryIdentifier,Boolean> The factories for which we have logged a warning. -
Constructor Summary
ConstructorsConstructorDescriptionMultiAuthoritiesFactory(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 TypeMethodDescriptionprivate voidapplyAndMask(int mask) SetsisIterationCompletedtoiterationCompleted & mask.private org.opengis.referencing.AuthorityFactorycache(AuthorityFactoryIdentifier identifier, org.opengis.referencing.AuthorityFactory factory) Caches the given factory, but without replacing existing instance if any.private booleancanLog(AuthorityFactoryIdentifier identifier) Returnstrueif thisMultiAuthoritiesFactorycan log a warning for the given factory.private <T> Tcombine(Class<T> type, DefinitionURI[] references, boolean isHTTP) Invoked when acreateFoo(…)method is given a combined URI.private static org.opengis.referencing.crs.GeneralDerivedCRScombine(org.opengis.referencing.crs.CoordinateReferenceSystem baseCRS, org.opengis.referencing.operation.Conversion fromBase, org.opengis.referencing.cs.CoordinateSystem cs) Invoked when acreateFoo(…)method is given a combined URI containing a conversion and a coordinate system.private static org.opengis.referencing.crs.GeodeticCRScombine(org.opengis.referencing.datum.GeodeticDatum datum, org.opengis.referencing.cs.CoordinateSystem cs) Invoked when acreateFoo(…)method is given a combined URI containing a datum and a coordinate system.private <T> Tcreate(AuthorityFactoryProxy<? extends T> proxy, String code) Creates an object from a code using the given proxy.org.opengis.referencing.cs.CartesianCScreateCartesianCS(String code) Creates a 2- or 3-dimensional Cartesian coordinate system made of straight orthogonal axes.org.opengis.referencing.crs.CompoundCRScreateCompoundCRS(String code) Creates a CRS describing the position of points through two or more independent coordinate reference systems.org.opengis.referencing.operation.CoordinateOperationCreates an operation for transforming coordinates in the source CRS to coordinates in the target CRS.org.opengis.referencing.crs.CoordinateReferenceSystemCreates an arbitrary coordinate reference system from a code.org.opengis.referencing.cs.CoordinateSystemcreateCoordinateSystem(String code) Creates an arbitrary coordinate system from a code.org.opengis.referencing.cs.CoordinateSystemAxisCreates a coordinate system axis with name, direction, unit and range of values.org.opengis.referencing.cs.CylindricalCScreateCylindricalCS(String code) Creates a 3-dimensional coordinate system made of a polar coordinate system extended by a straight perpendicular axis.org.opengis.referencing.datum.DatumcreateDatum(String code) Creates an arbitrary datum from a code.org.opengis.referencing.crs.DerivedCRScreateDerivedCRS(String code) Creates a CRS that is defined by its coordinate conversion from another CRS (not by a datum).org.opengis.referencing.datum.EllipsoidcreateEllipsoid(String code) Creates a geometric figure that can be used to describe the approximate shape of the earth.org.opengis.referencing.cs.EllipsoidalCScreateEllipsoidalCS(String code) Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometimes with ellipsoidal height.org.opengis.referencing.crs.EngineeringCRScreateEngineeringCRS(String code) Creates a 1-, 2- or 3-dimensional contextually local coordinate reference system.org.opengis.referencing.datum.EngineeringDatumcreateEngineeringDatum(String code) Creates a datum defining the origin of an engineering coordinate reference system.org.opengis.metadata.extent.ExtentcreateExtent(String code) Creates information about spatial, vertical, and temporal extent (usually a domain of validity) from a code.Set<org.opengis.referencing.operation.CoordinateOperation>createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS) Creates operations from source and target coordinate reference system codes.org.opengis.referencing.crs.GeocentricCRScreateGeocentricCRS(String code) Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth.org.opengis.referencing.datum.GeodeticDatumcreateGeodeticDatum(String code) Creates a datum defining the location and orientation of an ellipsoid that approximates the shape of the earth.org.opengis.referencing.crs.GeographicCRScreateGeographicCRS(String code) Creates a 2- or 3-dimensional coordinate reference system based on an ellipsoidal approximation of the geoid.org.opengis.referencing.crs.ImageCRScreateImageCRS(String code) Creates a 2-dimensional engineering coordinate reference system applied to locations in images.org.opengis.referencing.datum.ImageDatumcreateImageDatum(String code) Creates a datum defining the origin of an image coordinate reference system.org.opengis.referencing.IdentifiedObjectcreateObject(String code) Creates an arbitrary object from a code.org.opengis.referencing.operation.OperationMethodcreateOperationMethod(String code) 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.PolarCScreatePolarCS(String code) 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.PrimeMeridiancreatePrimeMeridian(String code) Creates a prime meridian defining the origin from which longitude values are determined.org.opengis.referencing.crs.ProjectedCRScreateProjectedCRS(String code) Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface.org.opengis.referencing.cs.SphericalCScreateSphericalCS(String code) Creates a 3-dimensional coordinate system with one distance measured from the origin and two angular coordinates.org.opengis.referencing.crs.TemporalCRScreateTemporalCRS(String code) Creates a 1-dimensional coordinate reference system used for the recording of time.org.opengis.referencing.datum.TemporalDatumcreateTemporalDatum(String code) Creates a datum defining the origin of a temporal coordinate reference system.org.opengis.referencing.cs.TimeCScreateTimeCS(String code) Creates a 1-dimensional coordinate system for heights or depths of points.javax.measure.Unit<?>createUnit(String code) Creates an unit of measurement from a code.org.opengis.referencing.crs.VerticalCRScreateVerticalCRS(String code) Creates a 1-dimensional coordinate reference system used for recording heights or depths.org.opengis.referencing.cs.VerticalCScreateVerticalCS(String code) Creates a 1-dimensional coordinate system for heights or depths of points.org.opengis.referencing.datum.VerticalDatumcreateVerticalDatum(String code) 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 thisMultiAuthoritiesFactory.org.opengis.metadata.citation.CitationReturns 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>
TgetAuthorityFactory(Class<T> type, String authority, String version) Returns the factory identified by the given type, authority and version.private org.opengis.referencing.AuthorityFactoryReturns the factory identified by the given type, authority and version.(package private) static StringgetCodeSpace(org.opengis.referencing.AuthorityFactory factory) Returns the "main" namespace of the given factory, ornullif none.Returns the code spaces of all factories given to the constructor.getCodeSpaces(org.opengis.referencing.AuthorityFactory factory) Returns the code spaces for the given factory.org.opengis.util.InternationalStringgetDescriptionText(String code) Returns a description of the object corresponding to a code.booleanReturns 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.voidreload()Clears the cache and notifies thisMultiAuthoritiesFactorythat all factories will need to be fetched again from the providers given at construction time.private static <T> Tremove(DefinitionURI[] references, org.opengis.referencing.IdentifiedObject[] components, Class<T> type) If the giventypeis found in the givenreferences, sets that reference element tonulland returns the correspondingcomponentselement.voidsetLenient(boolean lenient) Sets whether this factory should relax some rules when processing a given code.Methods inherited from class org.apache.sis.referencing.factory.GeodeticAuthorityFactory
appendStringTo, createParametricCRS, createParametricCS, createParametricDatum, regionMatches, toString, trimNamespaceMethods inherited from class org.apache.sis.util.iso.AbstractFactory
getVendorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opengis.util.Factory
getVendor
-
Field Details
-
providers
The factory providers given at construction time. Elements in the array are forCRSAuthorityFactory,CSAuthorityFactory,DatumAuthorityFactoryandCoordinateOperationAuthorityFactoryin that order. That order is defined by the constant values inAuthorityFactoryIdentifier.Note that this array is shorter than the amount of
AuthorityFactoryIdentifiervalues. The lastAuthorityFactoryIdentifiervalues are handled in a special way.The array may contain
nullelements 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 anIterableelement shall be synchronized on thatIterable. -
factories
private final ConcurrentMap<AuthorityFactoryIdentifier,org.opengis.referencing.AuthorityFactory> factoriesThe factories obtained fromgetAuthorityFactory(Class, String, String)and similar methods. -
isIterationCompleted
A bit masks identifying which providers have given us all their factories. The value(1 << type)is set whenMultiAuthoritiesFactoryhas iterated until the end ofproviders[type].iterator(). -
codeSpaces
The code spaces of all factories given to the constructor, created when first requested.- See Also:
-
isLenient
private volatile boolean isLenientWhether this factory should relax some rules when processing a given authority code. SeeisLenient()javadoc for a description of relaxed rules.- See Also:
-
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 tocreateFoo(String)methods will scan the supplied factories in their iteration order when first needed. The first factory having the requested namespace will be used.Requirements
MultiAuthoritiesFactorymay iterate over the sameIterablemore than once. Each iteration shall return the same instances than previous iterations, unlessreload()has been invoked.The
Iterables do not need to be thread-safe.MultiAuthoritiesFactorywill use them only in blocks synchronized on theIterableinstance. For example, all usages ofcrsFactorywill be done inside asynchronized(crsFactory)block.Name collision
If anIterablecontains 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
MultiAuthoritiesFactorycaches the factories found from the givenIterables, 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 creatingCoordinateReferenceSystemobjects, or null if none.csFactories- the factories for creatingCoordinateSystemobjects, or null if none.datumFactories- the factories for creatingDatumobjects, or null if none.copFactories- the factories for creatingCoordinateOperationobjects, or null if none.
-
-
Method Details
-
isLenient
public boolean isLenient()Returns whether this factory should relax some rules when processing a given authority code. If this value istrue, then the behavior of thisMultiAuthoritiesFactoryis 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 org.opengis.metadata.citation.Citation getAuthority()Returns the database or specification that defines the codes recognized by this factory. The default implementation returnsnullsinceMultiAuthoritiesFactoryis not about a particular authority.- Specified by:
getAuthorityin interfaceorg.opengis.referencing.AuthorityFactory- Specified by:
getAuthorityin classGeodeticAuthorityFactory- Returns:
- the organization responsible for definition of the database, or
nullif 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, thecontains(Object)method may returntruefor"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:
getAuthorityCodesin interfaceorg.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
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:
getCodeSpacesin classGeodeticAuthorityFactory- Returns:
- the code spaces of all factories.
-
getCodeSpaces
Returns the code spaces for the given factory. This method delegates toGeodeticAuthorityFactory.getCodeSpaces()if possible, or reproduces its default implementation otherwise. -
getCodeSpace
Returns the "main" namespace of the given factory, ornullif 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
factoryif no previous instance was cached, or the existing instance otherwise.
-
getAllFactories
Returns an iterator over all factories in thisMultiAuthoritiesFactory. Note that the same factory instance may be returned more than once if it implements more than one of theCRSAuthorityFactory,CSAuthorityFactory,DatumAuthorityFactoryorCoordinateOperationAuthorityFactoryinterfaces.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 oftype.- Parameters:
type- the type of the desired factory as one of theCRSAuthorityFactory,CSAuthorityFactory,DatumAuthorityFactoryorCoordinateOperationFactoryinterfaces.authority- the namespace or authority identifier of the desired factory. Examples:"EPSG","CRS"or"AUTO2".version- the version of the desired factory, ornullfor 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
Returnstrueif thisMultiAuthoritiesFactorycan 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:codehttp://www.opengis.net/def/type/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
getDescriptionTextin interfaceorg.opengis.referencing.AuthorityFactory- Overrides:
getDescriptionTextin classGeodeticAuthorityFactory- Parameters:
code- value allocated by authority.- Returns:
- a description of the object, or
nullif the object corresponding to the specifiedcodehas no description. - Throws:
org.opengis.util.FactoryException- if an error occurred while fetching the description.
- authority
-
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: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:
createObjectin interfaceorg.opengis.referencing.AuthorityFactory- Specified by:
createObjectin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createCoordinateReferenceSystemin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createCoordinateReferenceSystemin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createGeographicCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createGeographicCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createGeocentricCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createGeocentricCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createProjectedCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createProjectedCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createVerticalCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createVerticalCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createTemporalCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createTemporalCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createCompoundCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createCompoundCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createDerivedCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createDerivedCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createEngineeringCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createEngineeringCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/crs/authority/version/codehttp://www.opengis.net/gml/srs/authority.xml#code
- Specified by:
createImageCRSin interfaceorg.opengis.referencing.crs.CRSAuthorityFactory- Overrides:
createImageCRSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/datum/authority/version/code
- Specified by:
createDatumin interfaceorg.opengis.referencing.datum.DatumAuthorityFactory- Overrides:
createDatumin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/datum/authority/version/code
- Specified by:
createGeodeticDatumin interfaceorg.opengis.referencing.datum.DatumAuthorityFactory- Overrides:
createGeodeticDatumin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/datum/authority/version/code
- Specified by:
createVerticalDatumin interfaceorg.opengis.referencing.datum.DatumAuthorityFactory- Overrides:
createVerticalDatumin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/datum/authority/version/code
- Specified by:
createTemporalDatumin interfaceorg.opengis.referencing.datum.DatumAuthorityFactory- Overrides:
createTemporalDatumin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/datum/authority/version/code
- Specified by:
createEngineeringDatumin interfaceorg.opengis.referencing.datum.DatumAuthorityFactory- Overrides:
createEngineeringDatumin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/datum/authority/version/code
- Specified by:
createImageDatumin interfaceorg.opengis.referencing.datum.DatumAuthorityFactory- Overrides:
createImageDatumin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/ellipsoid/authority/version/code
- Specified by:
createEllipsoidin interfaceorg.opengis.referencing.datum.DatumAuthorityFactory- Overrides:
createEllipsoidin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/meridian/authority/version/code
- Specified by:
createPrimeMeridianin interfaceorg.opengis.referencing.datum.DatumAuthorityFactory- Overrides:
createPrimeMeridianin classGeodeticAuthorityFactory- 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:
- authority
-
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:
createExtentin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/cs/authority/version/code
- Specified by:
createCoordinateSystemin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createCoordinateSystemin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/cs/authority/version/code
- Specified by:
createEllipsoidalCSin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createEllipsoidalCSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/cs/authority/version/code
- Specified by:
createVerticalCSin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createVerticalCSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/cs/authority/version/code
- Specified by:
createTimeCSin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createTimeCSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/cs/authority/version/code
- Specified by:
createCartesianCSin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createCartesianCSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/cs/authority/version/code
- Specified by:
createSphericalCSin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createSphericalCSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/cs/authority/version/code
- Specified by:
createCylindricalCSin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createCylindricalCSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/cs/authority/version/code
- Specified by:
createPolarCSin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createPolarCSin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/axis/authority/version/code
- Specified by:
createCoordinateSystemAxisin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createCoordinateSystemAxisin classGeodeticAuthorityFactory- 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:
- authority
-
createUnit
Creates an unit of measurement from a code. The given code can use any of the following patterns, where version is optional:- authority
:code - authority
:version:code urn:ogc:def:uom:authority:version:codehttp://www.opengis.net/def/uom/authority/version/code
- Specified by:
createUnitin interfaceorg.opengis.referencing.cs.CSAuthorityFactory- Overrides:
createUnitin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/parameter/authority/version/code
- Overrides:
createParameterDescriptorin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/method/authority/version/code
- Specified by:
createOperationMethodin interfaceorg.opengis.referencing.operation.CoordinateOperationAuthorityFactory- Overrides:
createOperationMethodin classGeodeticAuthorityFactory- 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:
- authority
-
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:codehttp://www.opengis.net/def/coordinateOperation/authority/version/code
- Specified by:
createCoordinateOperationin interfaceorg.opengis.referencing.operation.CoordinateOperationAuthorityFactory- Overrides:
createCoordinateOperationin classGeodeticAuthorityFactory- 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:
- authority
-
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:
createFromCoordinateReferenceSystemCodesin interfaceorg.opengis.referencing.operation.CoordinateOperationAuthorityFactory- Overrides:
createFromCoordinateReferenceSystemCodesin classGeodeticAuthorityFactory- Parameters:
sourceCRS- coded value of source coordinate reference system.targetCRS- coded value of target coordinate reference system.- Returns:
- the operations from
sourceCRStotargetCRS. - 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 acreateFoo(…)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:"urn:ogc:def:crs:EPSG:9.1:27700""urn:ogc:def:crs:EPSG:9.1:5701"
- Type Parameters:
T- compile-time value oftypeargument.- 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 giventypeis found in the givenreferences, sets that reference element tonulland returns the correspondingcomponentselement. Otherwise returnsnull. This is equivalent toMap.remove(Object, Object)wherereferencesare the keys andcomponentsare 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 acreateFoo(…)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 returnsnull.- Parameters:
datum- the datum, ornullif missing.cs- the coordinate system (never null).- Returns:
- the combined CRS, or
nullif 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 acreateFoo(…)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 returnsnull.- Parameters:
baseCRS- the CRS on which the derived CRS will be based on, ornullif missing.fromBase- the conversion frombaseCRSto the CRS to be created by this method.cs- the coordinate system (never null).- Returns:
- the combined CRS, or
nullif the given information are not sufficient. - Throws:
org.opengis.util.FactoryException- if an error occurred while creating the combined CRS.
-
newIdentifiedObjectFinder
Creates a finder which can be used for looking up unidentified objects. The default implementation delegates the lookups to the underlying factories.- Overrides:
newIdentifiedObjectFinderin classGeodeticAuthorityFactory- 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 thisMultiAuthoritiesFactorythat all factories will need to be fetched again from the providers given at construction time. In addition, all providers that are instances ofServiceLoaderwill 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.
-
applyAndMask
private void applyAndMask(int mask)
-