WSL/SLF GitLab Repository

Commit c96ca526 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

In oshd, the stations' names are followed by the network they belong to,...

In oshd, the stations' names are followed by the network they belong to, separated by a space. This messes up the log analysis scripts of Snowpack, so now the names are cleaned up in order to remove both networks names and spaces.
parent d5f852f8
......@@ -562,10 +562,17 @@ void OshdIO::fillStationMeta()
buildVecIdx(vecAcro);
for (size_t ii=0; ii<vecIdx.size(); ii++) {
Coords position("CH1903", "");
const size_t idx = vecIdx[ii];
Coords position("CH1903", "");
position.setXY(easting[idx], northing[idx], altitude[idx]);
const StationData sd(position, vecAcro[idx], vecNames[idx]);
std::string name( vecNames[idx] );
//if the network name has been appended, remove it. We also remove spaces, just in case
const size_t netz_pos = name.find(" (");
if (netz_pos!=std::string::npos) name.erase(netz_pos);
std::replace( name.begin(), name.end(), ' ', '_');
const StationData sd(position, vecAcro[idx], name);
vecMeta[ii] = sd;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment