OGS
|
Namespaces | |
namespace | GMSH |
namespace | Gocad |
namespace | Legacy |
Classes | |
class | AsciiRasterInterface |
class | CsvInterface |
class | FEFLOWGeoInterface |
class | FEFLOWMeshInterface |
class | GMSInterface |
Manages the import and export of Aquaveo GMS files into and out of GeoLib. More... | |
class | PetrelInterface |
class | SHPInterface |
Manages the import of ESRI shape files into GeoLib. More... | |
class | SwmmInterface |
class | TetGenInterface |
class | XmlLutReader |
Reader for vtk-Lookup-Tables (in XML / ParaView Format) More... | |
class | XmlPrjInterface |
Enumerations | |
enum class | SwmmObject { SUBCATCHMENT = 0 , NODE = 1 , LINK = 2 , SYSTEM = 3 } |
SWMM object types. More... | |
Functions | |
bool | createSurface (GeoLib::Polyline const &ply, GeoLib::GEOObjects &geometries, std::string const &geometry_name, std::string const &gmsh_binary) |
std::unique_ptr< GeoLib::Surface > | createSurfaceWithEarClipping (GeoLib::Polyline const &line) |
static std::string | readLine (std::istream &in) |
static std::list< std::string > | split (std::string const &line) |
static void | printListInfo (const std::list< std::string > &str_list, std::string_view const prefix, std::string_view const message) |
static double | getLastNumberFromList (const std::list< std::string > &str_list) |
void | readGeometryFromFile (std::string const &fname, GeoLib::GEOObjects &geo_objs, std::string const &gmsh_path) |
auto | constructPointsFromNodes (std::vector< MeshLib::Node * > nodes) |
void | writeGeometryToFile (std::string const &geo_name, GeoLib::GEOObjects &geo_objs, std::string const &fname) |
void | addTextNode (QDomDocument &doc, QDomElement &parent, QString const &node_name, QString const &content) |
bool | PVarExists (std::string const &name, std::vector< DataHolderLib::ProcessVariable > const &p_vars) |
static double | readDoubleFromStream (std::istream &in) |
Reads a double replacing comma by point. | |
static std::optional< GeoLib::RasterHeader > | readASCHeader (std::ifstream &in) |
static std::optional< std::tuple< GeoLib::RasterHeader, double, double > > | readSurferHeader (std::ifstream &in) |
std::vector< std::string > | readFile (std::istream &in) |
std::optional< std::array< double, 3 > > | readXyzCoordinates (std::string const &line) |
GeoLib::RasterHeader | getXyzHeader (std::vector< std::string > const &lines) |
static bool | allRastersExist (std::vector< std::string > const &raster_paths) |
Checks if all raster files actually exist. | |
std::optional< std::vector< GeoLib::Raster const * > > | readRasters (std::vector< std::string > const &raster_paths) |
Variables | |
const std::array< std::string, 9 > | subcatchment_vars |
Variables that always exist for subcatchments. There might be more. | |
const std::array< std::string, 7 > | node_vars |
Variables that always exist for nodes. There might be more. | |
const std::array< std::string, 6 > | link_vars |
Variables that always exist for links. There might be more. | |
const std::array< std::string, 15 > | system_vars |
All variables that exist for the system. | |
std::array< std::size_t, 4 > const | n_obj_params = {8, 6, 5, 15} |
|
strong |
SWMM object types.
Enumerator | |
---|---|
SUBCATCHMENT | |
NODE | |
LINK | |
SYSTEM |
Definition at line 35 of file SWMMInterface.h.
void FileIO::addTextNode | ( | QDomDocument & | doc, |
QDomElement & | parent, | ||
QString const & | node_name, | ||
QString const & | content ) |
Definition at line 426 of file XmlPrjInterface.cpp.
Referenced by FileIO::XmlPrjInterface::writeCondition(), and FileIO::XmlPrjInterface::writeProcessVariables().
|
static |
Checks if all raster files actually exist.
Definition at line 381 of file AsciiRasterInterface.cpp.
References ERR().
Referenced by readRasters().
auto FileIO::constructPointsFromNodes | ( | std::vector< MeshLib::Node * > | nodes | ) |
Definition at line 36 of file TetGenInterface.cpp.
Referenced by FileIO::TetGenInterface::readTetGenGeometry().
bool FileIO::createSurface | ( | GeoLib::Polyline const & | ply, |
GeoLib::GEOObjects & | geometries, | ||
std::string const & | geometry_name, | ||
std::string const & | gmsh_binary ) |
Creates a plane surface from the given polyline. The polyline has to be closed, i.e. the first and the last point have to be the identical. The triangulation of the polyline is done by the finite element meshing tool Gmsh. Finally, the resulting mesh is converted into a GeoLib::Surface which is inserted into the GeoLib::GEOObjects
instance geometries
using the name geometry_name
.
Definition at line 33 of file createSurface.cpp.
References GeoLib::GEOObjects::addPointVec(), GeoLib::GEOObjects::addPolylineVec(), MeshToolsLib::convertMeshToGeo(), FileIO::GMSH::FixedMeshDensity, GeoLib::GEOObjects::getGeometryNames(), GeoLib::Polyline::getNumberOfPoints(), GeoLib::Polyline::getPointID(), GeoLib::Polyline::getPointsVec(), GeoLib::GEOObjects::getPointVec(), GeoLib::Polyline::isClosed(), GeoLib::GEOObjects::mergeGeometries(), BaseLib::randomString(), MeshLib::IO::readMeshFromFile(), GeoLib::GEOObjects::removePointVec(), GeoLib::GEOObjects::removePolylineVec(), GeoLib::GEOObjects::removeSurfaceVec(), GeoLib::GEOObjects::renameGeometry(), WARN(), BaseLib::IO::writeStringToFile(), and BaseLib::IO::Writer::writeToString().
Referenced by FileIO::SHPInterface::readPolygons(), and FileIO::Legacy::readSurfaces().
std::unique_ptr< GeoLib::Surface > FileIO::createSurfaceWithEarClipping | ( | GeoLib::Polyline const & | line | ) |
Creates a plane surface from the given polyline. The polyline has to be closed, i.e. the first and the last point have to be the identical. The triangulation of the polyline is done via a simple ear clipping algorithm.
Definition at line 132 of file createSurface.cpp.
References GeoLib::Polyline::getNumberOfPoints(), GeoLib::Polyline::getPointsVec(), GeoLib::Polyline::isClosed(), and WARN().
Referenced by GEOModels::connectPolylineSegments().
|
static |
Definition at line 137 of file PetrelInterface.cpp.
Referenced by FileIO::PetrelInterface::readPetrelWellTrace().
GeoLib::RasterHeader FileIO::getXyzHeader | ( | std::vector< std::string > const & | lines | ) |
Definition at line 273 of file AsciiRasterInterface.cpp.
References GeoLib::RasterHeader::cell_size, GeoLib::RasterHeader::n_cols, GeoLib::RasterHeader::n_depth, GeoLib::RasterHeader::n_rows, GeoLib::RasterHeader::no_data, GeoLib::RasterHeader::origin, and readXyzCoordinates().
Referenced by FileIO::AsciiRasterInterface::getRasterFromXyzFile().
|
static |
Definition at line 127 of file PetrelInterface.cpp.
References INFO().
Referenced by FileIO::PetrelInterface::readPetrelWellTrace(), and FileIO::PetrelInterface::readPetrelWellTraceData().
bool FileIO::PVarExists | ( | std::string const & | name, |
std::vector< DataHolderLib::ProcessVariable > const & | p_vars ) |
Definition at line 437 of file XmlPrjInterface.cpp.
Referenced by FileIO::XmlPrjInterface::getPrimaryVariableVec().
|
static |
Reads the header of a Esri asc-file. If the return value is empty, reading was not successful.
Definition at line 56 of file AsciiRasterInterface.cpp.
References GeoLib::RasterHeader::cell_size, GeoLib::RasterHeader::n_cols, GeoLib::RasterHeader::n_depth, GeoLib::RasterHeader::n_rows, GeoLib::RasterHeader::no_data, GeoLib::RasterHeader::origin, and readDoubleFromStream().
Referenced by FileIO::AsciiRasterInterface::getRasterFromASCFile().
|
static |
Reads a double replacing comma by point.
Definition at line 46 of file AsciiRasterInterface.cpp.
References BaseLib::replaceString().
Referenced by FileIO::AsciiRasterInterface::getRasterFromASCFile(), FileIO::AsciiRasterInterface::getRasterFromSurferFile(), and readASCHeader().
std::vector< std::string > FileIO::readFile | ( | std::istream & | in | ) |
Definition at line 247 of file AsciiRasterInterface.cpp.
Referenced by FileIO::AsciiRasterInterface::getRasterFromXyzFile().
void FileIO::readGeometryFromFile | ( | std::string const & | fname, |
GeoLib::GEOObjects & | geo_objs, | ||
std::string const & | gmsh_path ) |
Definition at line 24 of file readGeometryFromFile.cpp.
References BaseLib::getFileExtension(), GeoLib::GEOObjects::getGeometryNames(), OGS_FATAL, GeoLib::IO::BoostXmlGmlInterface::readFile(), and FileIO::Legacy::readGLIFileV4().
Referenced by main().
|
static |
Definition at line 77 of file PetrelInterface.cpp.
Referenced by FileIO::PetrelInterface::readPetrelSurfacePoints(), FileIO::PetrelInterface::readPetrelWellTrace(), and FileIO::PetrelInterface::readPetrelWellTraceData().
std::optional< std::vector< GeoLib::Raster const * > > FileIO::readRasters | ( | std::vector< std::string > const & | raster_paths | ) |
Reads a vector of rasters given by file names. On error nothing is returned, otherwise the returned vector contains pointers to the read rasters.
Definition at line 395 of file AsciiRasterInterface.cpp.
References allRastersExist().
Referenced by MeshLayerEditDialog::createPrismMesh(), MeshLayerEditDialog::createTetMesh(), and main().
|
static |
Reads the header of a Surfer grd-file with minimum and maximum values. If the return value is empty, reading was not successful.
Definition at line 170 of file AsciiRasterInterface.cpp.
References GeoLib::RasterHeader::cell_size, ERR(), GeoLib::RasterHeader::n_cols, GeoLib::RasterHeader::n_depth, GeoLib::RasterHeader::n_rows, GeoLib::RasterHeader::no_data, and GeoLib::RasterHeader::origin.
Referenced by FileIO::AsciiRasterInterface::getRasterFromSurferFile().
std::optional< std::array< double, 3 > > FileIO::readXyzCoordinates | ( | std::string const & | line | ) |
Definition at line 258 of file AsciiRasterInterface.cpp.
References ERR().
Referenced by FileIO::AsciiRasterInterface::getRasterFromXyzFile(), and getXyzHeader().
|
static |
Definition at line 84 of file PetrelInterface.cpp.
References BaseLib::splitString().
Referenced by FileIO::PetrelInterface::readPetrelWellTrace(), and FileIO::PetrelInterface::readPetrelWellTraceData().
void FileIO::writeGeometryToFile | ( | std::string const & | geo_name, |
GeoLib::GEOObjects & | geo_objs, | ||
std::string const & | fname ) |
Write geometry given by the geo_objs
object and specified by the name stored in param geo_name
either to a gml or a gli file. If the extension given in the fname
parameter is "gml" or "GML" a gml file is written. In case the extension is "gli" or "GLI" a gli file is written.
Definition at line 21 of file writeGeometryToFile.cpp.
References ERR(), BaseLib::IO::XMLInterface::export_name, BaseLib::getFileExtension(), FileIO::Legacy::writeGLIFileV4(), BaseLib::IO::writeStringToFile(), and BaseLib::IO::Writer::writeToString().
Referenced by main(), and writeBCsAndGeometry().
const std::array<std::string, 6> FileIO::link_vars |
Variables that always exist for links. There might be more.
Definition at line 57 of file SWMMInterface.cpp.
Referenced by FileIO::SwmmInterface::getArrayName().
std::array<std::size_t, 4> const FileIO::n_obj_params = {8, 6, 5, 15} |
Number of base variables for the four object types (subcatchments/nodes/links/system).
Definition at line 84 of file SWMMInterface.cpp.
Referenced by FileIO::SwmmInterface::getArrayAtTimeStep(), FileIO::SwmmInterface::getArrayForObject(), FileIO::SwmmInterface::getArrayName(), and FileIO::SwmmInterface::getNumberOfParameters().
const std::array<std::string, 7> FileIO::node_vars |
Variables that always exist for nodes. There might be more.
Definition at line 48 of file SWMMInterface.cpp.
Referenced by FileIO::SwmmInterface::getArrayName().
const std::array<std::string, 9> FileIO::subcatchment_vars |
Variables that always exist for subcatchments. There might be more.
Definition at line 36 of file SWMMInterface.cpp.
Referenced by FileIO::SwmmInterface::getArrayName().
const std::array<std::string, 15> FileIO::system_vars |
All variables that exist for the system.
Definition at line 65 of file SWMMInterface.cpp.
Referenced by FileIO::SwmmInterface::getArrayName().