Class CRSFactory


  • public class CRSFactory
    extends java.lang.Object
    A factory which can create CoordinateReferenceSystems from a variety of ways of specifying them. This is the primary way of creating coordinate systems for carrying out projections transformations.

    CoordinateReferenceSystems can be used to define CoordinateTransforms to perform transformations on ProjCoordinates.

    • Constructor Detail

      • CRSFactory

        public CRSFactory()
    • Method Detail

      • getRegistry

        public Registry getRegistry()
        Gets the Registry used by this factory.
        Returns:
        the Registry
      • readEpsgFromParameters

        public java.lang.String readEpsgFromParameters​(java.lang.String paramStr)
                                                throws java.io.IOException
        Finds a EPSG Code from a PROJ.4 projection parameter string.

        An example of a valid PROJ.4 projection parameter string is:

         +proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m
         
        Parameters:
        paramStr - a PROJ.4 projection parameter string
        Returns:
        the specified CoordinateReferenceSystem
        Throws:
        java.io.IOException - if there was an issue in reading EPSG file
      • readEpsgFromParameters

        public java.lang.String readEpsgFromParameters​(java.lang.String[] params)
                                                throws java.io.IOException
        Finds a EPSG Code defined by an array of PROJ.4 projection parameters. PROJ.4 parameters are generally of the form "+name=value".
        Parameters:
        params - an array of PROJ.4 projection parameters
        Returns:
        s String EPSG code
        Throws:
        java.io.IOException - if there was an issue in reading EPSG file
      • splitParameters

        private static java.lang.String[] splitParameters​(java.lang.String paramStr)