diff --git a/src/core/algo/GeoVolumeBuilder.cpp b/src/core/algo/GeoVolumeBuilder.cpp index 201ce71..037380b 100644 --- a/src/core/algo/GeoVolumeBuilder.cpp +++ b/src/core/algo/GeoVolumeBuilder.cpp @@ -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(f)), @@ -55,7 +56,7 @@ std::int64_t totalTracesOf(const std::vector& iprb, int samples) { const std::int64_t per = static_cast(samples) * 2; if (per <= 0) throw std::runtime_error("samples<=0"); for (const auto& p : iprb) { - const std::int64_t bytes = static_cast(fs::file_size(p)); + const std::int64_t bytes = static_cast(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& 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(ordF)), std::istreambuf_iterator());