Class Services
java.lang.Object
org.locationtech.proj4j.geoapi.Services
Default implementations of referencing services backed by PROJ4J.
Those services are accessible by
ServiceLoader,
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.opengis.referencing.crs.CoordinateReferenceSystemCreates a coordinate reference system from the given authority code.static org.opengis.referencing.operation.CoordinateOperationfindOperation(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.CRSAuthorityFactoryReturns the singleton factory for creating CRS from authority codes.static org.opengis.referencing.operation.CoordinateOperationFactoryReturns the singleton factory for creating coordinate operations between a pair of CRS.
-
Constructor Details
-
Services
private Services()Do not allows instantiation of this class.
-
-
Method Details
-
getAuthorityFactory
public static org.opengis.referencing.crs.CRSAuthorityFactory getAuthorityFactory()Returns the singleton factory for creating CRS from authority codes..- Returns:
- the singleton factory for creating CRS from authority codes
-
getOperationFactory
public static org.opengis.referencing.operation.CoordinateOperationFactory getOperationFactory()Returns the singleton factory for creating coordinate operations between a pair of CRS..- Returns:
- the singleton factory for creating coordinate operations between a pair of CRS
-
createCRS
public static org.opengis.referencing.crs.CoordinateReferenceSystem createCRS(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 specifiedcodewas 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
sourcetotarget - Throws:
org.opengis.util.FactoryException- if the coordinate operation cannot be created
-