public class CommonAuthorityFactory extends GeodeticAuthorityFactory implements CRSAuthorityFactory
OGC
", "CRS
" or "AUTO(2)"
namespaces.
All namespaces recognized by this factory are defined by the Open Geospatial Consortium (OGC).
Most codes map to one of the constants in the CommonCRS
enumeration.
Namespace | Code | Name | Datum type | CS type | Axis direction | Units |
---|---|---|---|---|---|---|
CRS | 1 | Computer display | Engineering | Cartesian | (east, south) | pixels |
CRS | 27 | NAD27 | Geographic | Ellipsoidal | (east, north) | degrees |
CRS | 83 | NAD83 | Geographic | Ellipsoidal | (east, north) | degrees |
CRS | 84 | WGS84 | Geographic | Ellipsoidal | (east, north) | degrees |
CRS | 88 | NAVD88 | Vertical | Vertical | up | metres |
AUTO2 | 42001 | WGS 84 / Auto UTM | Projected | Cartesian | (east, north) | user-specified |
AUTO2 | 42002 | WGS 84 / Auto Tr Mercator | Projected | Cartesian | (east, north) | user-specified |
AUTO2 | 42003 | WGS 84 / Auto Orthographic | Projected | Cartesian | (east, north) | user-specified |
AUTO2 | 42004 | WGS 84 / Auto Equirectangular | Projected | Cartesian | (east, north) | user-specified |
AUTO2 | 42005 | WGS 84 / Auto Mollweide | Projected | Cartesian | (east, north) | user-specified |
CRS:
n" where n is a number like 27, 83 or 84.
However this factory is lenient and allows the CRS
part to be repeated as in "CRS:CRS84"
.
It also accepts "OGC"
as a synonymous of the "CRS"
namespace.
"CRS:27"
, "CRS:83"
, "CRS:84"
, "CRS:CRS84"
, "OGC:CRS84"
.AUTO2:
n,factor,λ₀,φ₀"
where n is a number between 42001 and 42005 inclusive, factor is a conversion
factor from the CRS units to metres (e.g. 0.3048 for a CRS with axes in feet) and (λ₀,φ₀)
is the longitude and latitude of a point in the projection centre.
"AUTO2:42001,1,-100,45"
identifies a Universal Transverse Mercator (UTM) projection
for a zone containing the point at (45°N, 100°W) with axes in metres."AUTO"
namespace are the same than codes in the "AUTO2"
namespace, except that
the EPSG code of the desired unit of measurement
was used instead than the unit factor.
The "AUTO"
namespace was defined in the Web Map Service (WMS) 1.1.1 specification
while the "AUTO2"
namespace is defined in WMS 1.3.0.
In Apache SIS implementation, the unit parameter (either as factor or as EPSG code) is optional and defaults to metres.
In the AUTO(2):42001
case, the UTM zone is calculated as specified in WMS 1.3 specification,
i.e. without taking in account the Norway and Svalbard special cases and without
switching to polar stereographic projections for high latitudes.
CommonCRS
Defined in the sis-referencing
module
Constructor and Description |
---|
CommonAuthorityFactory()
Constructs a default factory for the
CRS authority. |
Modifier and Type | Method and Description |
---|---|
CoordinateReferenceSystem |
createCoordinateReferenceSystem(String code)
Creates a coordinate reference system from the specified code.
|
IdentifiedObject |
createObject(String code)
Creates an object from the specified code.
|
Citation |
getAuthority()
Returns the specification that defines the codes recognized by this factory.
|
Set<String> |
getAuthorityCodes(Class<? extends IdentifiedObject> type)
Provides a complete set of the known codes provided by this factory.
|
Set<String> |
getCodeSpaces()
Returns the namespaces defined by the OGC specifications implemented by this factory.
|
InternationalString |
getDescriptionText(String code)
Returns a description of the object corresponding to a code.
|
createCartesianCS, createCompoundCRS, createCoordinateOperation, createCoordinateSystem, createCoordinateSystemAxis, createCylindricalCS, createDatum, createDerivedCRS, createEllipsoid, createEllipsoidalCS, createEngineeringCRS, createEngineeringDatum, createExtent, createFromCoordinateReferenceSystemCodes, createGeocentricCRS, createGeodeticDatum, createGeographicCRS, createImageCRS, createImageDatum, createOperationMethod, createParameterDescriptor, createParametricCRS, createParametricCS, createParametricDatum, createPolarCS, createPrimeMeridian, createProjectedCRS, createSphericalCS, createTemporalCRS, createTemporalDatum, createTimeCS, createUnit, createVerticalCRS, createVerticalCS, createVerticalDatum, newIdentifiedObjectFinder, toString, trimNamespace
getVendor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createCompoundCRS, createDerivedCRS, createEngineeringCRS, createGeocentricCRS, createGeographicCRS, createImageCRS, createProjectedCRS, createTemporalCRS, createVerticalCRS
getVendor
public CommonAuthorityFactory()
CRS
authority.public Citation getAuthority()
While the authority is WMS, the namespace
of that authority is set to "OGC"
. Apache SIS does that for consistency with the namespace used
in URNs (for example "urn:ogc:def:crs:OGC:1.3:CRS84"
).
getAuthority
in interface AuthorityFactory
getAuthority
in class GeodeticAuthorityFactory
getCodeSpaces()
,
Citations.WMS
public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type) throws FactoryException
"CRS:84"
, "CRS:27"
, "AUTO2:42001"
, etc.getAuthorityCodes
in interface AuthorityFactory
type
- the spatial reference objects type.FactoryException
- if this method failed to provide the set of codes.public Set<String> getCodeSpaces()
CommonAuthorityFactory
are quite different than the authority title or identifier:
"WMS"
(for "Web Map Services")"CRS"
, "AUTO"
, "AUTO2"
.
The "OGC"
namespace is also accepted for compatibility reason,
but its scope is wider than the above-cited namespaces.getCodeSpaces
in class GeodeticAuthorityFactory
"CRS"
, "AUTO"
and "AUTO2"
strings.getAuthority()
,
Citations.WMS
public InternationalString getDescriptionText(String code) throws FactoryException
Codes in the "AUTO(2)"
namespace do not need parameters for this method.
But if parameters are nevertheless specified, then they will be taken in account.
Argument value | Return value |
---|---|
CRS:84 | WGS 84 |
AUTO2:42001 | WGS 84 / Auto UTM |
AUTO2:42001,1,-100,45 | WGS 84 / UTM zone 47N |
getDescriptionText
in interface AuthorityFactory
getDescriptionText
in class GeodeticAuthorityFactory
code
- value in the CRS or AUTO(2) code space.NoSuchAuthorityCodeException
- if the specified code
was not found.FactoryException
- if an error occurred while fetching the description.public IdentifiedObject createObject(String code) throws FactoryException
createCoordinateReferenceSystem(String)
.createObject
in interface AuthorityFactory
createObject
in class GeodeticAuthorityFactory
code
- value allocated by authority.FactoryException
- if the object creation failed.AbstractIdentifiedObject
public CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws FactoryException
"OGC"
, "CRS"
, "AUTO"
, "AUTO1"
or "AUTO2"
namespace
if present (ignoring case). All other namespaces will cause an exception to be thrown."CRS"
prefix if present. This additional check is for accepting codes like
"OGC:CRS84"
(not a valid CRS code, but seen in practice).createCoordinateReferenceSystem
in interface CRSAuthorityFactory
createCoordinateReferenceSystem
in class GeodeticAuthorityFactory
code
- value allocated by OGC.FactoryException
- if the object creation failed.AbstractCRS
,
CRS.forCode(String)
Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.