* @param file NTv2 grid file name
* @throws NoSuchIdentifierException if the grid is not available.
*/
public NTv2Transform(URI file) throws NoSuchIdentifierException {
if (file == null) {
throw new NoSuchIdentifierException("No NTv2 Grid File specified.", null);
}
this.grid = file;
gridLocation = locateGrid(grid.toString());
if(gridLocation == null) {
throw new NoSuchIdentifierException("Could not locate NTv2 Grid File " + file, null);
}
// Search for grid file
if (!FACTORY.isNTv2Grid(gridLocation)) {
throw new NoSuchIdentifierException("NTv2 Grid File not available.",
file.toString());
}
}