OGS
|
Interface for reading and writing a number of ASCII raster formats. Currently supported are reading and writing of Esri asc-files and reading of Surfer grd-files.
Definition at line 29 of file AsciiRasterInterface.h.
#include <AsciiRasterInterface.h>
Static Public Member Functions | |
static GeoLib::Raster * | readRaster (std::string const &fname) |
static GeoLib::Raster * | getRasterFromASCFile (std::string const &fname) |
Reads an ArcGis ASC raster file. | |
static GeoLib::Raster * | getRasterFromSurferFile (std::string const &fname) |
Reads a Surfer GRD raster file. | |
static GeoLib::Raster * | getRasterFromXyzFile (std::string const &fname) |
Reads a XYZ raster file. | |
static void | writeRasterAsASC (GeoLib::Raster const &raster, std::string const &file_name) |
Writes an Esri asc-file. | |
|
static |
Reads an ArcGis ASC raster file.
Definition at line 131 of file AsciiRasterInterface.cpp.
References FileIO::readASCHeader(), FileIO::readDoubleFromStream(), and WARN().
Referenced by VtkRaster::loadImage(), main(), MainWindow::mapGeometry(), and readRaster().
|
static |
Reads a Surfer GRD raster file.
Definition at line 210 of file AsciiRasterInterface.cpp.
References ERR(), FileIO::readDoubleFromStream(), and FileIO::readSurferHeader().
Referenced by VtkRaster::loadImage(), and readRaster().
|
static |
Reads a XYZ raster file.
Definition at line 315 of file AsciiRasterInterface.cpp.
References ERR(), FileIO::getXyzHeader(), FileIO::readFile(), and FileIO::readXyzCoordinates().
Referenced by VtkRaster::loadImage(), and readRaster().
|
static |
Reads raster file by detecting type based on extension and then calling the appropriate method
Definition at line 26 of file AsciiRasterInterface.cpp.
References BaseLib::getFileExtension(), getRasterFromASCFile(), getRasterFromSurferFile(), and getRasterFromXyzFile().
Referenced by DirectConditionGenerator::directToSurfaceNodes(), DirectConditionGenerator::directWithSurfaceIntegration(), main(), MeshView::openMap2dMeshDialog(), MeshView::openRasterDataToMeshDialog(), and anonymous_namespace{NetCDFRasterReader.cpp}::readRasterFromFile().
|
static |
Writes an Esri asc-file.
Definition at line 349 of file AsciiRasterInterface.cpp.
References GeoLib::RasterHeader::cell_size, GeoLib::Raster::data(), GeoLib::Raster::getHeader(), GeoLib::RasterHeader::n_cols, GeoLib::RasterHeader::n_rows, GeoLib::RasterHeader::no_data, and GeoLib::RasterHeader::origin.
Referenced by convert(), main(), and VtkVisImageItem::writeAsRaster().