| 83 | {} |
| 84 | |
| 85 | void 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 | |
| 106 | std::string I3SInterface::fetchJson(std::string filepath) |