Class Services

java.lang.Object
org.locationtech.proj4j.geoapi.Services

public final class Services extends Object
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
    Modifier
    Constructor
    Description
    private
    Do not allows instantiation of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.opengis.referencing.crs.CoordinateReferenceSystem
    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
    Returns the singleton factory for creating CRS from authority codes.
    static org.opengis.referencing.operation.CoordinateOperationFactory
    Returns the singleton factory for creating coordinate operations between a pair of CRS.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 specified code was not found
      org.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 system
      target - output coordinate reference system
      Returns:
      a coordinate operation from source to target
      Throws:
      org.opengis.util.FactoryException - if the coordinate operation cannot be created