String importFilePath = props.importFilePath;
File mapFile = new File(importFilePath);
CoordinateReferenceSystem fileCrs = null;
GridCoverage2D geodata = null;
if (mapFile.getName().endsWith(".asc")) {
ArcGridReader arcGridReader = new ArcGridReader(mapFile);
geodata = arcGridReader.read(null);
geodata = geodata.view(ViewType.GEOPHYSICS);
geodata = JGrassCatalogUtilities.removeNovalues(geodata);
fileCrs = arcGridReader.getCrs();
} else if (mapFile.getName().endsWith(".tif") || mapFile.getName().endsWith(".tiff")) {
GeoTiffReader geotiffGridReader = new GeoTiffReader(mapFile);
geodata = geotiffGridReader.read(null);
geodata = geodata.view(ViewType.GEOPHYSICS);
geodata = JGrassCatalogUtilities.removeNovalues(geodata);