Class GeodeticAuthorityFactory

java.lang.Object
org.apache.sis.util.iso.AbstractFactory
org.apache.sis.referencing.factory.GeodeticAuthorityFactory
All Implemented Interfaces:
org.opengis.referencing.AuthorityFactory, org.opengis.util.Factory
Direct Known Subclasses:
CommonAuthorityFactory, ConcurrentAuthorityFactory, EPSGDataAccess, EPSGFactoryFallback, MultiAuthoritiesFactory, WKTDictionary

public abstract class GeodeticAuthorityFactory extends AbstractFactory implements org.opengis.referencing.AuthorityFactory
Creates geodetic objects from codes defined by an authority. An authority is an organization that maintains definitions of authority codes. An authority code is a compact string defined by an authority to reference a particular spatial reference object. A frequently used set of authority codes is the EPSG geodetic dataset, a database of coordinate systems and other spatial referencing objects where each object has a code number ID.
Example: the EPSG code for a World Geodetic System 1984 (WGS84) coordinate reference system with latitude and longitude axes is "4326".

This class defines a default implementation for most methods defined in the DatumAuthorityFactory, CSAuthorityFactory and CRSAuthorityFactory interfaces. However, those interfaces do not appear in the implements clause of this class declaration. This is up to subclasses to decide which interfaces they declare to implement.

The default implementation for all createFoo(String) methods ultimately invokes createObject(String), which may be the only method that a subclass need to override. However, other methods may be overridden as well for better performances.

Since:
0.7
Version:
0.8
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a new authority factory for geodetic objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    Hook for subclasses.
    private <T> T
    cast(Class<T> type, org.opengis.referencing.IdentifiedObject object, String code)
    Casts the given object to the given type, or throws an exception if the object cannot be casted.
    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.
    abstract org.opengis.referencing.IdentifiedObject
    Returns 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.
    Creates a 1-dimensional parametric coordinate reference system.
    Creates a 1-dimensional parametric coordinate system.
    Creates a datum defining the origin of a parametric coordinate reference system.
    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 time elapsed in the specified time units from a specified time origin.
    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.
    abstract org.opengis.metadata.citation.Citation
    Returns the database or specification that defines the codes recognized by this factory.
    Returns all namespaces recognized by this factory.
    org.opengis.util.InternationalString
    Returns a description of the object corresponding to a code.
    Creates a finder which can be used for looking up unidentified objects.
    (package private) static boolean
    regionMatches(String namespace, String code, int start, int end)
    Returns true if the given portion of the code is equal, ignoring case, to the given namespace.
    Returns a string representation of this factory for debugging purpose only.
    protected final String
    Trims the namespace, if present.

    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.referencing.AuthorityFactory

    getAuthorityCodes

    Methods inherited from interface org.opengis.util.Factory

    getVendor
  • Constructor Details

    • GeodeticAuthorityFactory

      protected GeodeticAuthorityFactory()
      Creates a new authority factory for geodetic objects.
  • Method Details

    • getAuthority

      public abstract org.opengis.metadata.citation.Citation getAuthority()
      Returns the database or specification that defines the codes recognized by this factory. This method may return null if it cannot obtain this information, for example because the connection to a database is not available.
      Example: a factory that create coordinate reference system objects from EPSG codes could return a citation like below: The online resource description with a “Connection” function is a SIS extension.
      Specified by:
      getAuthority in interface org.opengis.referencing.AuthorityFactory
      Returns:
      the organization responsible for definition of the database, or null if unknown.
      See Also:
    • getCodeSpaces

      public Set<String> getCodeSpaces()
      Returns all namespaces recognized by this factory. Those namespaces can appear before codes in calls to createFoo(String) methods, for example "EPSG" in "EPSG:4326". Namespaces are case-insensitive.

      The namespaces are closely related to the authority. Often the namespace is the authority identifier, but not always.

      Examples:
      • The EPSGFactory authority identifier is "EPSG" and its getCodeSpaces() method returns a set containing "EPSG". So in this example, authority and namespace match. That namespace value means that EPSGFactory.createFoo(String) methods accept both "EPSG:4326" (case-insensitive) and "4326" codes as argument.
      • The EPSGDataAccess authority identifier is "EPSG" but its getCodeSpaces() method returns an empty set. This means that despite the EPSG authority, EPSGDataAccess.createFoo(String) methods accept only codes like "4326" without "EPSG:" prefix (the reason is that EPSGDataAccess is not expected to be used directly).
      • The CommonAuthorityFactory authority identifiers are ISO 19128 and OGC 06-042 (the WMS specification) but its getCodeSpaces() method returns a set containing "CRS", "AUTO" and "AUTO2". While ISO 19128 is defined as the first authority, the namespace is actually defined by OGC.
      The default implementation infers the namespace from the authority. Subclasses can override this method, but the set should always contain the same elements during all factory lifetime.
      Returns:
      the namespaces recognized by this factory, or an empty set if none.
    • 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 description can be used for example in a combo box in a graphical user interface.

      Default implementation

      The default implementation invokes createObject(String) for the given code and returns the object name. This may be costly since it involves a full object creation. Subclasses are encouraged to provide a more efficient implementation if they can.
      Specified by:
      getDescriptionText in interface org.opengis.referencing.AuthorityFactory
      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.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if an error occurred while fetching the description.
    • createObject

      public abstract org.opengis.referencing.IdentifiedObject createObject(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Returns an arbitrary object from a code. The returned object will typically be an instance of Datum, CoordinateSystem, CoordinateReferenceSystem or CoordinateOperation. This method may be used when the type of the object to create is unknown. But it is recommended to invoke the most specific createFoo(String) method when the desired type is known, both for performance reason and for avoiding ambiguity.

      Note for subclasses

      In default GeodeticAuthorityFactory implementation, all createFoo(String) methods ultimately delegate to this createObject(String) method and verify if the created object is of the desired type. Overriding this method is sufficient for supporting the more specific createFoo(String) methods, but subclasses are encouraged to override the latter for efficiency.
      Specified by:
      createObject in interface org.opengis.referencing.AuthorityFactory
      Parameters:
      code - value allocated by authority.
      Returns:
      the object for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createCoordinateReferenceSystem

      public org.opengis.referencing.crs.CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates an arbitrary coordinate reference system from a code. The returned object will typically be an instance of GeographicCRS, ProjectedCRS, VerticalCRS or CompoundCRS. If the coordinate reference system type is known at compile time, it is recommended to invoke the most precise method instead of this one (for example createGeographicCRS(String) instead of createCoordinateReferenceSystem(code) if the caller know he is asking for a geographic coordinate reference system).
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. Two frequently used authorities are "CRS" and "EPSG", which include the following codes:
      Authority codes examples
      Code Type Description
      CRS:84 Geographic Like EPSG:4326 except for (longitude, latitude) axis order
      EPSG:4326 Geographic World Geodetic System 1984
      EPSG:4979 Geographic 3D World Geodetic System 1984
      EPSG:4978 Geocentric World Geodetic System 1984
      EPSG:3395 Projected WGS 84 / World Mercator
      EPSG:5714 Vertical Mean Sea Level height
      EPSG:6349 Compound NAD83(2011) + NAVD88 height
      EPSG:5800 Engineering Astra Minas Grid

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createGeographicCRS

      public org.opengis.referencing.crs.GeographicCRS createGeographicCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 2- or 3-dimensional coordinate reference system based on an ellipsoidal approximation of the geoid. This provides an accurate representation of the geometry of geographic features for a large portion of the earth's surface.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. Two frequently used authorities are "CRS" and "EPSG", which include the following codes:
      Authority codes examples
      Code Type Description
      CRS:27 Geographic Like EPSG:4267 except for (longitude, latitude) axis order
      CRS:83 Geographic Like EPSG:4269 except for (longitude, latitude) axis order
      CRS:84 Geographic Like EPSG:4326 except for (longitude, latitude) axis order
      EPSG:4322 Geographic World Geodetic System 1972
      EPSG:4985 Geographic 3D World Geodetic System 1972
      EPSG:4326 Geographic World Geodetic System 1984
      EPSG:4979 Geographic 3D World Geodetic System 1984
      EPSG:4267 Geographic North American Datum 1927
      EPSG:4269 Geographic North American Datum 1983
      EPSG:4230 Geographic European Datum 1950
      EPSG:4258 Geographic European Terrestrial Reference Frame 1989
      EPSG:4937 Geographic 3D European Terrestrial Reference Frame 1989

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createGeocentricCRS

      public org.opengis.referencing.crs.GeocentricCRS createGeocentricCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth. A geocentric CRS deals with the earth's curvature by taking a 3-dimensional spatial view, which obviates the need to model the earth's curvature.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:4936 European Terrestrial Reference Frame 1989
      EPSG:4978 World Geodetic System 1984
      EPSG:4984 World Geodetic System 1972

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed.
      See Also:
    • createProjectedCRS

      public org.opengis.referencing.crs.ProjectedCRS createProjectedCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface. It is done in such a way that the distortion that is inherent to the approximation is carefully controlled and known. Distortion correction is commonly applied to calculated bearings and distances to produce values that are a close match to actual field values.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which contains more than 4000 codes for projected CRS. Some of them are:
      Authority codes examples
      Code Description
      EPSG:3034 ETRS89 / Lambert Conic Conformal Europe
      EPSG:3395 WGS 84 / World Mercator
      EPSG:6350 NAD83(2011) / Conus Albers Equal Area

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createVerticalCRS

      public org.opengis.referencing.crs.VerticalCRS createVerticalCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 1-dimensional coordinate reference system used for recording heights or depths. Vertical CRSs make use of the direction of gravity to define the concept of height or depth, but the relationship with gravity may not be straightforward.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:5715 Mean Sea Level depth
      EPSG:5714 Mean Sea Level height

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createTemporalCRS

      public org.opengis.referencing.crs.TemporalCRS createTemporalCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 1-dimensional coordinate reference system used for the recording of time.

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createParametricCRS

      public DefaultParametricCRS createParametricCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 1-dimensional parametric coordinate reference system.

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Warning: in a future SIS version, the return type may be changed to org.opengis.referencing.crs.ParametricCRS. This change is pending GeoAPI revision.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createCompoundCRS

      public org.opengis.referencing.crs.CompoundCRS createCompoundCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a CRS describing the position of points through two or more independent coordinate reference systems.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:6349 NAD83(2011) + NAVD88 height
      EPSG:7423 ETRS89 + EVRF2007 height

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createDerivedCRS

      public org.opengis.referencing.crs.DerivedCRS createDerivedCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a CRS that is defined by its coordinate conversion from another CRS (not by a datum). DerivedCRS cannot be ProjectedCRS themselves, but may be derived from a projected CRS.

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createEngineeringCRS

      public org.opengis.referencing.crs.EngineeringCRS createEngineeringCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 1-, 2- or 3-dimensional contextually local coordinate reference system.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:5800 Astra Minas Grid

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createImageCRS

      public org.opengis.referencing.crs.ImageCRS createImageCRS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 2-dimensional engineering coordinate reference system applied to locations in images. Image coordinate reference systems are treated as a separate sub-type because a separate user community exists for images with its own terms of reference.

      Default implementation

      The default implementation delegates to createCoordinateReferenceSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate reference system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createDatum

      public org.opengis.referencing.datum.Datum createDatum(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates an arbitrary datum from a code. The returned object will typically be an instance of GeodeticDatum, VerticalDatum or TemporalDatum. If the datum is known at compile time, it is recommended to invoke the most precise method instead of this one.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which contains hundred of datum. Some of them are:
      Authority codes examples
      Code Type Description
      EPSG:6326 Geodetic World Geodetic System 1984
      EPSG:6322 Geodetic World Geodetic System 1972
      EPSG:1027 Vertical EGM2008 geoid
      EPSG:5100 Vertical Mean Sea Level
      EPSG:9315 Engineering Seismic bin grid datum

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createGeodeticDatum

      public org.opengis.referencing.datum.GeodeticDatum createGeodeticDatum(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a datum defining the location and orientation of an ellipsoid that approximates the shape of the earth. Geodetic datum are used together with ellipsoidal coordinate system, and also with Cartesian coordinate system centered in the ellipsoid (or sphere).
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which contains hundred of datum. Some of them are:
      Authority codes examples
      Code Description
      EPSG:6326 World Geodetic System 1984
      EPSG:6322 World Geodetic System 1972
      EPSG:6269 North American Datum 1983
      EPSG:6258 European Terrestrial Reference System 1989

      Default implementation

      The default implementation delegates to createDatum(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createVerticalDatum

      public org.opengis.referencing.datum.VerticalDatum createVerticalDatum(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a datum identifying a particular reference level surface used as a zero-height surface. There are several types of vertical datums, and each may place constraints on the axis with which it is combined to create a vertical CRS.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:5100 Mean Sea Level
      EPSG:1027 EGM2008 geoid
      EPSG:1131 Japanese Geodetic Datum 2011 (vertical)
      EPSG:5215 European Vertical Reference Frame 2007

      Default implementation

      The default implementation delegates to createDatum(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createTemporalDatum

      public org.opengis.referencing.datum.TemporalDatum createTemporalDatum(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a datum defining the origin of a temporal coordinate reference system.

      Default implementation

      The default implementation delegates to createDatum(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createParametricDatum

      public DefaultParametricDatum createParametricDatum(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a datum defining the origin of a parametric coordinate reference system.

      Default implementation

      The default implementation delegates to createDatum(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Warning: in a future SIS version, the return type may be changed to org.opengis.referencing.datum.ParametricDatum. This change is pending GeoAPI revision.
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createEngineeringDatum

      public org.opengis.referencing.datum.EngineeringDatum createEngineeringDatum(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a datum defining the origin of an engineering coordinate reference system. An engineering datum is used in a region around that origin. This origin can be fixed with respect to the earth or be a defined point on a moving vehicle.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:9315 Seismic bin grid datum
      EPSG:9300 Astra Minas

      Default implementation

      The default implementation delegates to createDatum(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createImageDatum

      public org.opengis.referencing.datum.ImageDatum createImageDatum(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a datum defining the origin of an image coordinate reference system. An image datum is used in a local context only. For an image datum, the anchor point is usually either the centre of the image or the corner of the image.

      Default implementation

      The default implementation delegates to createDatum(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the datum for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createEllipsoid

      public org.opengis.referencing.datum.Ellipsoid createEllipsoid(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a geometric figure that can be used to describe the approximate shape of the earth. In mathematical terms, it is a surface formed by the rotation of an ellipse about its minor axis.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:7030 WGS 84
      EPSG:7034 Clarke 1880
      EPSG:7048 GRS 1980 Authalic Sphere

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the ellipsoid for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createPrimeMeridian

      public org.opengis.referencing.datum.PrimeMeridian createPrimeMeridian(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a prime meridian defining the origin from which longitude values are determined.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:8901 Greenwich
      EPSG:8903 Paris
      EPSG:8904 Bogota
      EPSG:8905 Madrid
      EPSG:8906 Rome

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the prime meridian for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createExtent

      public org.opengis.metadata.extent.Extent createExtent(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates information about spatial, vertical, and temporal extent (usually a domain of validity) from a code.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:1262 World
      EPSG:3391 World - between 80°S and 84°N

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the extent for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createCoordinateSystem

      public org.opengis.referencing.cs.CoordinateSystem createCoordinateSystem(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates an arbitrary coordinate system from a code. The returned object will typically be an instance of EllipsoidalCS, CartesianCS, VerticalCS or TimeCS. If the coordinate system is known at compile time, it is recommended to invoke the most precise method instead of this one.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Type Axes Orientations Unit
      EPSG:4496 Cartesian 2D CS easting, northing (E,N) east, north metre
      EPSG:6422 Ellipsoidal 2D CS latitude, longitude north, east degree
      EPSG:6423 Ellipsoidal 3D CS latitude, longitude, ellipsoidal height north, east, up degree, degree, metre
      EPSG:6404 Spherical 3D CS latitude, longitude, radius north, east, up degree, degree, metre
      EPSG:6499 Vertical CS height (H) up metre

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createEllipsoidalCS

      public org.opengis.referencing.cs.EllipsoidalCS createEllipsoidalCS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometimes with ellipsoidal height.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Axes Orientations Unit
      EPSG:6422 latitude, longitude north, east degree
      EPSG:6424 longitude, latitude east, north degree
      EPSG:6429 longitude, latitude east, north radian
      EPSG:6423 latitude, longitude, ellipsoidal height north, east, up degree, degree, metre

      Default implementation

      The default implementation delegates to createCoordinateSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createVerticalCS

      public org.opengis.referencing.cs.VerticalCS createVerticalCS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 1-dimensional coordinate system for heights or depths of points.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Axes Orientations Unit
      EPSG:6498 depth (D) down metre
      EPSG:6499 height (H) up metre

      Default implementation

      The default implementation delegates to createCoordinateSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createTimeCS

      public org.opengis.referencing.cs.TimeCS createTimeCS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 1-dimensional coordinate system for time elapsed in the specified time units from a specified time origin.

      Default implementation

      The default implementation delegates to createCoordinateSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createParametricCS

      public DefaultParametricCS createParametricCS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 1-dimensional parametric coordinate system.

      Default implementation

      The default implementation delegates to createCoordinateSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Warning: in a future SIS version, the return type may be changed to org.opengis.referencing.cs.ParametricCS. This change is pending GeoAPI revision.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createCartesianCS

      public org.opengis.referencing.cs.CartesianCS createCartesianCS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 2- or 3-dimensional Cartesian coordinate system made of straight orthogonal axes. All axes shall have the same linear unit of measure.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Axes Orientations Unit
      EPSG:4406 easting, northing (E,N) east, north kilometre
      EPSG:4496 easting, northing (E,N) east, north metre
      EPSG:4500 northing, easting (N,E) north, east metre
      EPSG:4491 westing, northing (W,N) west, north metre

      Default implementation

      The default implementation delegates to createCoordinateSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createSphericalCS

      public org.opengis.referencing.cs.SphericalCS createSphericalCS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 3-dimensional coordinate system with one distance measured from the origin and two angular coordinates. Not to be confused with an ellipsoidal coordinate system based on an ellipsoid "degenerated" into a sphere.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Axes Orientations Unit
      EPSG:6404 latitude, longitude, radius north, east, up degree, degree, metre

      Default implementation

      The default implementation delegates to createCoordinateSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createCylindricalCS

      public org.opengis.referencing.cs.CylindricalCS createCylindricalCS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a 3-dimensional coordinate system made of a polar coordinate system extended by a straight perpendicular axis.

      Default implementation

      The default implementation delegates to createCoordinateSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createPolarCS

      public org.opengis.referencing.cs.PolarCS createPolarCS(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, 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.

      Default implementation

      The default implementation delegates to createCoordinateSystem(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the coordinate system for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createCoordinateSystemAxis

      public org.opengis.referencing.cs.CoordinateSystemAxis createCoordinateSystemAxis(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a coordinate system axis with name, direction, unit and range of values.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description Unit
      EPSG:106 Latitude (φ) degree
      EPSG:107 Longitude (λ) degree
      EPSG:1 Easting (E) metre
      EPSG:2 Northing (N) metre

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the axis for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createUnit

      public javax.measure.Unit<?> createUnit(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates an unit of measurement from a code.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:9002 decimal degree
      EPSG:9001 metre
      EPSG:9030 kilometre
      EPSG:1040 second
      EPSG:1029 year
      See Units.valueOfEPSG(int) for a more complete list of codes.

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the unit of measurement for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createParameterDescriptor

      public org.opengis.parameter.ParameterDescriptor<?> createParameterDescriptor(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a definition of a single parameter used by an operation method.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:8801 Latitude of natural origin
      EPSG:8802 Longitude of natural origin
      EPSG:8805 Scale factor at natural origin
      EPSG:8806 False easting
      EPSG:8807 False northing

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the parameter descriptor for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createOperationMethod

      public org.opengis.referencing.operation.OperationMethod createOperationMethod(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates a description of the algorithm and parameters used to perform a coordinate operation. An OperationMethod is a kind of metadata: it does not perform any coordinate operation (e.g. map projection) by itself, but tells us what is needed in order to perform such operation.

      Available methods depend both on the set declared by the authority and on the list of methods implemented in Apache SIS. In order to be supported, an operation method must have its formulas coded in the Java programming language. See MathTransformProvider for more information.

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the operation method for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createCoordinateOperation

      public org.opengis.referencing.operation.CoordinateOperation createCoordinateOperation(String code) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates an operation for transforming coordinates in the source CRS to coordinates in the target CRS. Coordinate operations contain a math transform, which does the actual work of transforming coordinates.
      Example: the set of available codes depends on the defining authority and the GeodeticAuthorityFactory subclass in use. A frequently used authority is "EPSG", which includes the following codes:
      Authority codes examples
      Code Description
      EPSG:1133 ED50 to WGS 84 (1)
      EPSG:1241 NAD27 to NAD83 (1)
      EPSG:1173 NAD27 to WGS 84 (4)
      EPSG:6326 NAD83(2011) to NAVD88 height (1)

      Default implementation

      The default implementation delegates to createObject(String) and casts the result. If the result cannot be casted, then a NoSuchAuthorityCodeException is thrown.
      Parameters:
      code - value allocated by authority.
      Returns:
      the operation for the given code.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
      See Also:
    • createFromCoordinateReferenceSystemCodes

      public Set<org.opengis.referencing.operation.CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS) throws org.opengis.referencing.NoSuchAuthorityCodeException, org.opengis.util.FactoryException
      Creates operations from source and target coordinate reference system codes. This method should only extract the information explicitly declared in a database like EPSG. This method should not attempt to infer by itself operations that are not explicitly recorded in the database.

      Default implementation

      The default implementation returns an empty set.
      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.referencing.NoSuchAuthorityCodeException - if a specified code was not found.
      org.opengis.util.FactoryException - if the object creation failed for some other reason.
    • newIdentifiedObjectFinder

      public IdentifiedObjectFinder newIdentifiedObjectFinder() throws org.opengis.util.FactoryException
      Creates a finder which can be used for looking up unidentified objects. The finder tries to fetch a fully identified object from an incomplete one, for example from an object without "ID[…]" or "AUTHORITY[…]" element in Well Known Text.
      Returns:
      a finder to use for looking up unidentified objects.
      Throws:
      org.opengis.util.FactoryException - if the finder cannot be created.
      See Also:
    • regionMatches

      static boolean regionMatches(String namespace, String code, int start, int end)
      Returns true if the given portion of the code is equal, ignoring case, to the given namespace.
      Parameters:
      namespace - expected namespace (e.g. "OGC" or "EPSG").
      code - the code where to check namespace.
      start - index of first character of the namespace in the code.
      end - index after last character of the namespace in the code.
      Returns:
      whether the specified region of the code is equal to the namespace.
    • trimNamespace

      protected final String trimNamespace(String code)
      Trims the namespace, if present. For example if this factory is an EPSG authority factory and the specified code start with the "EPSG:" prefix, then the prefix is removed. Otherwise, the string is returned unchanged (except for leading and trailing spaces).
      Parameters:
      code - the code to trim.
      Returns:
      the code with the namespace part removed if that part matched one of the values given by getCodeSpaces().
      Since:
      0.8
    • cast

      private <T> T cast(Class<T> type, org.opengis.referencing.IdentifiedObject object, String code) throws org.opengis.referencing.NoSuchAuthorityCodeException
      Casts the given object to the given type, or throws an exception if the object cannot be casted. This convenience method is provided for implementation of createXXX methods.
      Parameters:
      type - the type to return (e.g. CoordinateReferenceSystem.class).
      object - the object to cast.
      code - the authority code, used only for formatting an error message.
      Returns:
      the object casted to the given type.
      Throws:
      org.opengis.referencing.NoSuchAuthorityCodeException - if the given object is not an instance of the given type.
    • toString

      public String toString()
      Returns a string representation of this factory for debugging purpose only. The string returned by this method may change in any future SIS version.
      Overrides:
      toString in class Object
      Returns:
      a string representation for debugging purpose.
    • appendStringTo

      void appendStringTo(StringBuilder buffer)
      Hook for subclasses.