MCPcopy Create free account
hub / github.com/PDAL/PDAL / fetchBinary

Method fetchBinary

io/I3SReader.cpp:113–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111
112
113std::vector<char> I3SInterface::fetchBinary(std::string url,
114 std::string attNum, std::string ext) const
115{
116 const int NumRetries(5);
117 int retry = 0;
118
119 std::string filepath = m_filename + "/layers/0/" + url + attNum;
120 // For the REST I3S endpoint there are no file extensions.
121 std::vector<char> result;
122 while (true)
123 {
124 auto data = m_arbiter.tryGetBinary(filepath);
125 if (data)
126 {
127 result = std::move(*data);
128 break;
129 }
130 if (++retry == NumRetries)
131 throw EsriError(std::string("Failed to fetch: " + filepath));
132 std::this_thread::sleep_for(std::chrono::milliseconds(250));
133 }
134 return result;
135}
136
137} //namespace pdal

Callers 1

loadPathMethod · 0.45

Calls 1

EsriErrorClass · 0.85

Tested by

no test coverage detected