MeteoIODoc 20241221.207bde49
iCSVHelper.cc File Reference

Contains helper functions and classes for processing iCSV data. More...

#include <fstream>
#include <iostream>
#include <meteoio/dataClasses/MeteoData.h>
#include <meteoio/plugins/iCSVHelper.h>
#include <regex>

Namespaces

namespace  mio
 
namespace  mio::iCSV
 

Functions

static const std::regex POINT ("^POINT\\s*\\‍(\\s*-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s*\\‍)$", std::regex::optimize)
 
static const std::regex FALSEPOINT ("^POINT\\s*\\‍(\\s*-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s*\\‍)$", std::regex::optimize)
 
static const std::regex POINTZ ("^POINTZ\\s*\\‍(\\s*-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s*\\‍)$", std::regex::optimize)
 
static void mio::iCSV::custom_assert (const std::string &value, const std::string &asssert_val)
 
static bool mio::iCSV::isValidFirstLine (const std::string &firstline)
 
static std::vector< double > mio::iCSV::extractMatches (const std::string &match)
 Extracts values out of geometry strings. More...
 
static geoLocation mio::iCSV::processGeometryRegexes (const std::string &geometry, const std::regex &reg, const bool &has_Z)
 process geometry strings to return a geoLocation object. More...
 
static std::string mio::iCSV::extractEpsgCode (const std::string &epsgStr)
 Extracts the EPSG code from a string in the format "EPSG:XXXX". More...
 
static bool mio::iCSV::isValidEpsgCode (const std::string &epsgStr)
 
std::vector< double > mio::iCSV::convertVector (const std::vector< std::string > &vec)
 
std::vector< Coords > mio::iCSV::convertVector (const std::vector< geoLocation > &vec, const int &epsg)
 
geoLocation mio::iCSV::toiCSVLocation (Coords loc, const int &epsg)
 
geoLocation mio::iCSV::extractCoordinates (const std::string &geometry)
 extracts a geoLocation object out of a WKT geometry string. More...
 
bool mio::iCSV::operator== (const geoLocation &lhs, const geoLocation &rhs)
 
bool mio::iCSV::operator!= (const geoLocation &lhs, const geoLocation &rhs)
 
bool mio::iCSV::operator== (const MetaDataSection &lhs, const MetaDataSection &rhs)
 
bool mio::iCSV::roughlyEqual (const MetaDataSection &lhs, const MetaDataSection &rhs)
 Checks if two MetaDataSection objects are roughly equal. More...
 
MetaDataSection & mio::iCSV::operator+= (MetaDataSection &lhs, const MetaDataSection &rhs)
 
bool mio::iCSV::operator== (const fieldsSection &lhs, const fieldsSection &rhs)
 
bool mio::iCSV::roughlyEqual (const fieldsSection &lhs, const fieldsSection &rhs)
 Checks if two fieldsSection objects are roughly equal. More...
 
fieldsSection & mio::iCSV::operator+= (fieldsSection &lhs, const fieldsSection &rhs)
 

Detailed Description

Contains helper functions and classes for processing iCSV data.

Function Documentation

◆ FALSEPOINT()

static const std::regex FALSEPOINT ( "^POINT\\s*\\‍(\\s*-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s*\\‍)$"  ,
std::regex::optimize   
)
static

◆ POINT()

static const std::regex POINT ( "^POINT\\s*\\‍(\\s*-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s*\\‍)$"  ,
std::regex::optimize   
)
static

◆ POINTZ()

static const std::regex POINTZ ( "^POINTZ\\s*\\‍(\\s*-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s+-?\\d+(\\.\\d+)?\\s*\\‍)$"  ,
std::regex::optimize   
)
static