OGS
AsciiRasterInterface.h
Go to the documentation of this file.
1
14#pragma once
15
16#include <fstream>
17#include <optional>
18#include <string>
19#include <vector>
20
21#include "GeoLib/Raster.h"
22
23namespace FileIO
24{
31public:
33 static GeoLib::Raster* readRaster(std::string const& fname);
34
36 static GeoLib::Raster* getRasterFromASCFile(std::string const& fname);
37
39 static GeoLib::Raster* getRasterFromSurferFile(std::string const& fname);
40
42 static void writeRasterAsASC(GeoLib::Raster const& raster, std::string const& file_name);
43};
44
47std::optional<std::vector<GeoLib::Raster const*>> readRasters(
48 std::vector<std::string> const& raster_paths);
49} // end namespace FileIO
Definition of the GeoLib::Raster class.
static GeoLib::Raster * getRasterFromSurferFile(std::string const &fname)
Reads a Surfer GRD raster file.
static void writeRasterAsASC(GeoLib::Raster const &raster, std::string const &file_name)
Writes an Esri asc-file.
static GeoLib::Raster * readRaster(std::string const &fname)
Reads raster file by detecting type based on extension and then calling the appropriate method.
static GeoLib::Raster * getRasterFromASCFile(std::string const &fname)
Reads an ArcGis ASC raster file.
Class Raster is used for managing raster data.
Definition: Raster.h:45
std::optional< std::vector< GeoLib::Raster const * > > readRasters(std::vector< std::string > const &raster_paths)