Class Services


  • public final class Services
    extends java.lang.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 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}.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Services

        private Services()
        Do not allows instantiation of this class.
    • 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 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