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

Method initInfo

io/I3SReader.cpp:85–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83{}
84
85void I3SInterface::initInfo()
86{
87 try
88 {
89 std::string s = m_arbiter.get(m_filename);
90 NL::json info = i3s::parse(s, "Invalid JSON in file '" + m_filename + "'.");
91
92 if (info.empty())
93 throw pdal_error(std::string("Incorrect Json object"));
94 if (!info.contains("layers"))
95 throw pdal_error(std::string("Json object contains no layers"));
96
97 m_info = info["layers"][0];
98 }
99 catch(i3s::EsriError& e)
100 {
101 throw pdal_error(std::string("Error parsing Json object: ") + e.what());
102 }
103}
104
105
106std::string I3SInterface::fetchJson(std::string filepath)

Callers 1

initializeMethod · 0.45

Calls 5

parseFunction · 0.50
getMethod · 0.45
emptyMethod · 0.45
containsMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected