Package org.locationtech.proj4j.geoapi
Class Services
- java.lang.Object
-
- org.locationtech.proj4j.geoapi.Services
-
public final class Services extends java.lang.Object
Default implementations of referencing services backed by PROJ4J. Those services are accessible byServiceLoader
, which should be used by implementation-neutral applications. This class provides shortcuts for the convenience of applications that do not need implementation neutrality.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Services()
Do not allows instantiation of this class.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.opengis.referencing.crs.CoordinateReferenceSystem
createCRS(java.lang.String code)
Creates a coordinate reference system from the given authority code.static org.opengis.referencing.operation.CoordinateOperation
findOperation(org.opengis.referencing.crs.CoordinateReferenceSystem source, org.opengis.referencing.crs.CoordinateReferenceSystem target)
Creates a coordinate operation between the given pair of coordinate reference systems.static org.opengis.referencing.crs.CRSAuthorityFactory
getAuthorityFactory()
{@return the singleton factory for creating CRS from authority codes}.static org.opengis.referencing.operation.CoordinateOperationFactory
getOperationFactory()
{@return the singleton factory for creating coordinate operations between a pair of CRS}.
-
-
-
Method Detail
-
getAuthorityFactory
public static org.opengis.referencing.crs.CRSAuthorityFactory getAuthorityFactory()
{@return the singleton factory for creating CRS from authority codes}.
-
getOperationFactory
public static org.opengis.referencing.operation.CoordinateOperationFactory getOperationFactory()
{@return the singleton factory for creating coordinate operations between a pair of CRS}.
-
createCRS
public static org.opengis.referencing.crs.CoordinateReferenceSystem createCRS(java.lang.String code) throws org.opengis.util.FactoryException
Creates a coordinate reference system from the given authority code. The argument should be of the form"AUTHORITY:CODE"
. If the authority is unspecified, then"EPSG"
is assumed.- Parameters:
code
- the authority code- Returns:
- coordinate reference system for the given code
- Throws:
org.opengis.referencing.NoSuchAuthorityCodeException
- if the specifiedcode
was not foundorg.opengis.util.FactoryException
- if the object creation failed for some other reason
-
findOperation
public static org.opengis.referencing.operation.CoordinateOperation findOperation(org.opengis.referencing.crs.CoordinateReferenceSystem source, org.opengis.referencing.crs.CoordinateReferenceSystem target) throws org.opengis.util.FactoryException
Creates a coordinate operation between the given pair of coordinate reference systems.- Parameters:
source
- input coordinate reference systemtarget
- output coordinate reference system- Returns:
- a coordinate operation from
source
totarget
- Throws:
org.opengis.util.FactoryException
- if the coordinate operation cannot be created
-
-