feat/vtk-merged-dataset-column #10

Merged
gaozheng merged 40 commits from feat/vtk-merged-dataset-column into main 2026-07-01 14:48:38 +08:00
1 changed files with 4 additions and 3 deletions
Showing only changes of commit a6ade4939f - Show all commits

View File

@ -22,6 +22,7 @@
#include "io/gpr/GpsTrack.hpp"
#include "io/gpr/IprHeader.hpp"
#include "io/gpr/IprbReader.hpp"
#include "io/gpr/LocalPath.hpp"
namespace fs = std::filesystem;
@ -33,7 +34,7 @@ constexpr double kPi = 3.14159265358979323846;
// 读 .iprh 文本 → 解析头(与 .iprb 同名)。
geopro::io::gpr::IprHeader readHeaderFor(const std::string& iprbPath) {
fs::path h = fs::path(iprbPath).replace_extension(".iprh");
fs::path h = geopro::io::gpr::localPath(iprbPath).replace_extension(".iprh");
std::ifstream f(h);
if (!f) throw std::runtime_error("GeoVolumeBuilder: 打不开 iprh " + h.string());
std::string text((std::istreambuf_iterator<char>(f)),
@ -55,7 +56,7 @@ std::int64_t totalTracesOf(const std::vector<std::string>& iprb, int samples) {
const std::int64_t per = static_cast<std::int64_t>(samples) * 2;
if (per <= 0) throw std::runtime_error("samples<=0");
for (const auto& p : iprb) {
const std::int64_t bytes = static_cast<std::int64_t>(fs::file_size(p));
const std::int64_t bytes = static_cast<std::int64_t>(fs::file_size(geopro::io::gpr::localPath(p)));
minTr = std::min(minTr, bytes / per);
}
return minTr;
@ -137,7 +138,7 @@ GeoBuildResult buildGeoVolume(const std::vector<GeoLineInput>& lines,
for (const auto& p : tracks[i].pts)
sc.trackM.push_back(lonLatToLocalM(p.lat, p.lon, minLat, minLon));
std::ifstream ordF(lines[i].ord);
std::ifstream ordF(geopro::io::gpr::localPath(lines[i].ord));
if (!ordF) throw std::runtime_error("buildGeoVolume: 打不开 ord " + lines[i].ord);
std::string ordText((std::istreambuf_iterator<char>(ordF)),
std::istreambuf_iterator<char>());