/** * Constructs a {@code NADCONTransform} from the specified grid shift files. * * @param latGridName path and name (or just name if {@link #GRID_LOCATION} is set) to the * latitude difference file. This will have a {@code .las} or {@code .laa} file extention. * @param longGridName path and name (or just name if {@link #GRID_LOCATION} is set) to the * longitude difference file. This will have a {@code .los} or {@code .loa} file extention. * @throws ParameterNotFoundException if a math transform parameter cannot be found. * @throws FactoryException if there is a problem creating this math transform (ie file * extentions are unknown or there is an error reading the grid files) */ public NADCONTransform(final URI latGridName, final URI longGridName) throws ParameterNotFoundException, FactoryException { if (latGridName == null) { throw new NoSuchIdentifierException("Latitud grid shift file name is null", null); } if (longGridName == null) { throw new NoSuchIdentifierException("Latitud grid shift file name is null", null); } this.latGridName = latGridName; this.longGridName = longGridName; URL latGridURL = locateGrid(latGridName); URL longGridURL = locateGrid(longGridName); this.grid = FACTORY.loadGridShift(latGridURL, longGridURL); this.gridShiftTransform = grid.getMathTransform(); }