Class GeodeticAuthorityFactory
- All Implemented Interfaces:
AuthorityFactory
,Factory
- Direct Known Subclasses:
CommonAuthorityFactory
,ConcurrentAuthorityFactory
,EPSGDataAccess
,MultiAuthoritiesFactory
,WKTDictionary
"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
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new authority factory for geodetic objects. -
Method Summary
Modifier and TypeMethodDescriptioncreateCartesianCS
(String code) Creates a 2- or 3-dimensional Cartesian coordinate system made of straight orthogonal axes.createCompoundCRS
(String code) Creates a CRS describing the position of points through two or more independent coordinate reference systems.Creates an operation for transforming coordinates in the source CRS to coordinates in the target CRS.Creates an arbitrary coordinate reference system from a code.Creates an arbitrary coordinate system from a code.Creates a coordinate system axis with name, direction, unit and range of values.createCylindricalCS
(String code) Creates a 3-dimensional coordinate system made of a polar coordinate system extended by a straight perpendicular axis.createDatum
(String code) Creates an arbitrary datum from a code.createDerivedCRS
(String code) Creates a CRS that is defined by its coordinate conversion from another CRS (not by a datum).createEllipsoid
(String code) Creates a geometric figure that can be used to describe the approximate shape of the earth.createEllipsoidalCS
(String code) Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometimes with ellipsoidal height.createEngineeringCRS
(String code) Creates a 1-, 2- or 3-dimensional contextually local coordinate reference system.Creates a datum defining the origin of an engineering coordinate reference system.createExtent
(String code) Creates information about spatial, vertical, and temporal extent (usually a domain of validity) from a code.createFromCoordinateReferenceSystemCodes
(String sourceCRS, String targetCRS) Creates operations from source and target coordinate reference system codes.createGeocentricCRS
(String code) Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth.createGeodeticDatum
(String code) Creates a datum defining the location and orientation of an ellipsoid that approximates the shape of the earth.createGeographicCRS
(String code) Creates a 2- or 3-dimensional coordinate reference system based on an ellipsoidal approximation of the geoid.createImageCRS
(String code) Creates a 2-dimensional engineering coordinate reference system applied to locations in images.createImageDatum
(String code) Creates a datum defining the origin of an image coordinate reference system.abstract IdentifiedObject
createObject
(String code) Returns an arbitrary object from a code.Creates a description of the algorithm and parameters used to perform a coordinate operation.Creates a definition of a single parameter used by an operation method.createParametricCRS
(String code) Creates a 1-dimensional parametric coordinate reference system.createParametricCS
(String code) Creates a 1-dimensional parametric coordinate system.Creates a datum defining the origin of a parametric coordinate reference system.createPolarCS
(String code) Creates a 2-dimensional coordinate system for coordinates represented by a distance from the origin and an angle from a fixed direction.createPrimeMeridian
(String code) Creates a prime meridian defining the origin from which longitude values are determined.createProjectedCRS
(String code) Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface.createSphericalCS
(String code) Creates a 3-dimensional coordinate system with one distance measured from the origin and two angular coordinates.createTemporalCRS
(String code) Creates a 1-dimensional coordinate reference system used for the recording of time.createTemporalDatum
(String code) Creates a datum defining the origin of a temporal coordinate reference system.createTimeCS
(String code) Creates a 1-dimensional coordinate system for time elapsed in the specified time units from a specified time origin.Unit
<?> createUnit
(String code) Creates an unit of measurement from a code.createVerticalCRS
(String code) Creates a 1-dimensional coordinate reference system used for recording heights or depths.createVerticalCS
(String code) Creates a 1-dimensional coordinate system for heights or depths of points.createVerticalDatum
(String code) Creates a datum identifying a particular reference level surface used as a zero-height surface.abstract Citation
Returns the database or specification that defines the codes recognized by this factory.Returns all namespaces recognized by this factory.getDescriptionText
(String code) Returns a description of the object corresponding to a code.Creates a finder which can be used for looking up unidentified objects.Returns a string representation of this factory for debugging purpose only.protected final String
trimNamespace
(String code) Trims the namespace, if present.Methods inherited from class AbstractFactory
getVendor
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface AuthorityFactory
getAuthorityCodes
Methods inherited from interface Factory
getVendor
-
Constructor Details
-
GeodeticAuthorityFactory
protected GeodeticAuthorityFactory()Creates a new authority factory for geodetic objects.
-
-
Method Details
-
getAuthority
Returns the database or specification that defines the codes recognized by this factory. This method may returnnull
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:Citation ├─ Title ……………………………………………………… EPSG Geodetic Parameter Dataset ├─ Identifier ………………………………………… EPSG ├─ Online resource (1 of 2) │ ├─ Linkage ………………………………………… https://epsg.org/ │ └─ Function ……………………………………… Browse └─ Online resource (2 of 2) ├─ Linkage ………………………………………… jdbc:derby:/my/path/to/SIS_DATA/Databases/SpatialMetadata ├─ Description ……………………………… EPSG dataset version 9.1 on “Apache Derby Embedded JDBC Driver” version 10.14. └─ Function ……………………………………… Connection
The online resource description with a “Connection” function is a SIS extension.- Specified by:
getAuthority
in interfaceAuthorityFactory
- Returns:
- the organization responsible for definition of the database, or
null
if unknown. - See Also:
-
getCodeSpaces
Returns all namespaces recognized by this factory. Those namespaces can appear before codes in calls tocreateFoo(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 itsgetCodeSpaces()
method returns a set containing"EPSG"
. So in this example, authority and namespace match. That namespace value means thatEPSGFactory.createFoo(String)
methods accept both"EPSG:4326"
(case-insensitive) and"4326"
codes as argument. - The
EPSGDataAccess
authority identifier is"EPSG"
but itsgetCodeSpaces()
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 thatEPSGDataAccess
is not expected to be used directly). - The
CommonAuthorityFactory
authority identifiers are ISO 19128 and OGC 06-042 (the WMS specification) but itsgetCodeSpaces()
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.
Default implementation
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.
- The
-
getDescriptionText
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 invokescreateObject(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 interfaceAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- a description of the object, or
null
if the object corresponding to the specifiedcode
has no description. - Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if an error occurred while fetching the description.
-
createObject
public abstract IdentifiedObject createObject(String code) throws NoSuchAuthorityCodeException, FactoryException Returns an arbitrary object from a code. The returned object will typically be an instance ofDatum
,CoordinateSystem
,CoordinateReferenceSystem
orCoordinateOperation
. This method may be used when the type of the object to create is unknown. But it is recommended to invoke the most specificcreateFoo(String)
method when the desired type is known, both for performance reason and for avoiding ambiguity.Note for subclasses
In defaultGeodeticAuthorityFactory
implementation, allcreateFoo(String)
methods ultimately delegate to thiscreateObject(String)
method and verify if the created object is of the desired type. Overriding this method is sufficient for supporting the more specificcreateFoo(String)
methods, but subclasses are encouraged to override the latter for efficiency.- Specified by:
createObject
in interfaceAuthorityFactory
- Parameters:
code
- value allocated by authority.- Returns:
- the object for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createCoordinateReferenceSystem
public CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws NoSuchAuthorityCodeException, FactoryException Creates an arbitrary coordinate reference system from a code. The returned object will typically be an instance ofGeographicCRS
,ProjectedCRS
,VerticalCRS
orCompoundCRS
. 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 examplecreateGeographicCRS(String)
instead ofcreateCoordinateReferenceSystem(code)
if the caller know he is asking for a geographic coordinate reference system).Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createGeographicCRS
public GeographicCRS createGeographicCRS(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createGeocentricCRS
public GeocentricCRS createGeocentricCRS(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed.- See Also:
-
createProjectedCRS
public ProjectedCRS createProjectedCRS(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createVerticalCRS
public VerticalCRS createVerticalCRS(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createTemporalCRS
public TemporalCRS createTemporalCRS(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a 1-dimensional coordinate reference system used for the recording of time.Default implementation
The default implementation delegates tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createParametricCRS
public DefaultParametricCRS createParametricCRS(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a 1-dimensional parametric coordinate reference system.Default implementation
The default implementation delegates tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.Warning: in a future SIS version, the return type may be changed toorg.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:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createCompoundCRS
public CompoundCRS createCompoundCRS(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a CRS describing the position of points through two or more independent coordinate reference systems.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createDerivedCRS
public DerivedCRS createDerivedCRS(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a CRS that is defined by its coordinate conversion from another CRS (not by a datum).DerivedCRS
cannot beProjectedCRS
themselves, but may be derived from a projected CRS.Default implementation
The default implementation delegates tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createEngineeringCRS
public EngineeringCRS createEngineeringCRS(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a 1-, 2- or 3-dimensional contextually local coordinate reference system.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createImageCRS
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 tocreateCoordinateReferenceSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate reference system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createDatum
Creates an arbitrary datum from a code. The returned object will typically be an instance ofGeodeticDatum
,VerticalDatum
orTemporalDatum
. If the datum is known at compile time, it is recommended to invoke the most precise method instead of this one.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createGeodeticDatum
public GeodeticDatum createGeodeticDatum(String code) throws NoSuchAuthorityCodeException, 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).Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateDatum(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createVerticalDatum
public VerticalDatum createVerticalDatum(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateDatum(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createTemporalDatum
public TemporalDatum createTemporalDatum(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a datum defining the origin of a temporal coordinate reference system.Default implementation
The default implementation delegates tocreateDatum(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createParametricDatum
public DefaultParametricDatum createParametricDatum(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a datum defining the origin of a parametric coordinate reference system.Default implementation
The default implementation delegates tocreateDatum(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.Warning: in a future SIS version, the return type may be changed toorg.opengis.referencing.datum.ParametricDatum
. This change is pending GeoAPI revision.- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createEngineeringDatum
public EngineeringDatum createEngineeringDatum(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateDatum(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createImageDatum
public ImageDatum createImageDatum(String code) throws NoSuchAuthorityCodeException, 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 tocreateDatum(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the datum for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createEllipsoid
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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the ellipsoid for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createPrimeMeridian
public PrimeMeridian createPrimeMeridian(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a prime meridian defining the origin from which longitude values are determined.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the prime meridian for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createExtent
Creates information about spatial, vertical, and temporal extent (usually a domain of validity) from a code.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the extent for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createCoordinateSystem
public CoordinateSystem createCoordinateSystem(String code) throws NoSuchAuthorityCodeException, FactoryException Creates an arbitrary coordinate system from a code. The returned object will typically be an instance ofEllipsoidalCS
,CartesianCS
,VerticalCS
orTimeCS
. If the coordinate system is known at compile time, it is recommended to invoke the most precise method instead of this one.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createEllipsoidalCS
public EllipsoidalCS createEllipsoidalCS(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a 2- or 3-dimensional coordinate system for geodetic latitude and longitude, sometimes with ellipsoidal height.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createVerticalCS
public VerticalCS createVerticalCS(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a 1-dimensional coordinate system for heights or depths of points.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createTimeCS
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 tocreateCoordinateSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createParametricCS
public DefaultParametricCS createParametricCS(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a 1-dimensional parametric coordinate system.Default implementation
The default implementation delegates tocreateCoordinateSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.Warning: in a future SIS version, the return type may be changed toorg.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:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createCartesianCS
public CartesianCS createCartesianCS(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createSphericalCS
public SphericalCS createSphericalCS(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateCoordinateSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createCylindricalCS
public CylindricalCS createCylindricalCS(String code) throws NoSuchAuthorityCodeException, 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 tocreateCoordinateSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createPolarCS
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 tocreateCoordinateSystem(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the coordinate system for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createCoordinateSystemAxis
public CoordinateSystemAxis createCoordinateSystemAxis(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a coordinate system axis with name, direction, unit and range of values.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the axis for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createUnit
Creates an unit of measurement from a code.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 Units.valueOfEPSG(int)
for a more complete list of codes.Default implementation
The default implementation delegates tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the unit of measurement for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createParameterDescriptor
public ParameterDescriptor<?> createParameterDescriptor(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a definition of a single parameter used by an operation method.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the parameter descriptor for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createOperationMethod
public OperationMethod createOperationMethod(String code) throws NoSuchAuthorityCodeException, FactoryException Creates a description of the algorithm and parameters used to perform a coordinate operation. AnOperationMethod
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the operation method for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createCoordinateOperation
public CoordinateOperation createCoordinateOperation(String code) throws NoSuchAuthorityCodeException, 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.Examples
The set of available codes depends on the defining authority and theGeodeticAuthorityFactory
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 tocreateObject(String)
and casts the result. If the result cannot be casted, then aNoSuchAuthorityCodeException
is thrown.- Parameters:
code
- value allocated by authority.- Returns:
- the operation for the given code.
- Throws:
NoSuchAuthorityCodeException
- if the specifiedcode
was not found.FactoryException
- if the object creation failed for some other reason.- See Also:
-
createFromCoordinateReferenceSystemCodes
public Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(String sourceCRS, String targetCRS) throws NoSuchAuthorityCodeException, 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
totargetCRS
. - Throws:
NoSuchAuthorityCodeException
- if a specified code was not found.FactoryException
- if the object creation failed for some other reason.
-
newIdentifiedObjectFinder
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:
FactoryException
- if the finder cannot be created.- See Also:
-
trimNamespace
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
-
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.
-