| 104 | } |
| 105 | |
| 106 | std::string stacType(const NL::json& stac) |
| 107 | { |
| 108 | try |
| 109 | { |
| 110 | return stac.at("type").get<std::string>(); |
| 111 | } |
| 112 | catch (NL::detail::out_of_range& e) |
| 113 | { |
| 114 | std::stringstream msg; |
| 115 | msg << "Missing required key 'type'. " << e.what(); |
| 116 | throw pdal_error(msg.str()); |
| 117 | } |
| 118 | catch (NL::detail::type_error& e) |
| 119 | { |
| 120 | std::stringstream msg; |
| 121 | msg << "Invalid key value 'type'. " << e.what(); |
| 122 | throw pdal_error(msg.str()); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | std::string icSelfPath(const NL::json& json) |
| 127 | { |