Class NTv2GridShiftFactory

    • Field Detail

      • LOGGER

        protected static final Logger LOGGER
        Logger.
    • Constructor Detail

      • NTv2GridShiftFactory

        public NTv2GridShiftFactory()
        Constructs a factory with the default priority.
      • NTv2GridShiftFactory

        public NTv2GridShiftFactory​(int priority)
        Constructs an instance using the specified priority level.
        Parameters:
        priority - The priority for this factory, as a number between MINIMUM_PRIORITY and MAXIMUM_PRIORITY inclusive.
    • Method Detail

      • isNTv2Grid

        public boolean isNTv2Grid​(URL location)
        Performs a NTv2 grid file lookup given its name, and checks for file format correctness.
        Parameters:
        location - The NTv2 grid file location
        Returns:
        true if file exists and is valid, false otherwise
      • createNTv2Grid

        public GridShiftFile createNTv2Grid​(URL gridLocation)
                                     throws FactoryException
        Creates a NTv2 Grid.
        Parameters:
        gridLocation - The NTv2 grid file location
        Returns:
        the grid
        Throws:
        FactoryException - if grid cannot be created
      • isNTv2GridFileValid

        protected boolean isNTv2GridFileValid​(URL url)
        Checks if a given resource is a valid NTv2 file without fully loading it.

        If file is not valid, the cause is logged at warning level.

        Parameters:
        url - the NTv2 file absolute path
        Returns:
        true if file has NTv2 format, false otherwise