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

Method validate

io/private/stac/Catalog.cpp:228–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void Catalog::validate()
229{
230 nlohmann::json_schema::json_validator val(
231 [this](const nlohmann::json_uri& json_uri, nlohmann::json& json) {
232 json = m_connector.getJson(json_uri.url());
233 },
234 [](const std::string &, const std::string &) {}
235 );
236
237 NL::json schemaJson = m_connector.getJson(m_schemaUrls.catalog);
238 val.set_root_schema(schemaJson);
239 try {
240 val.validate(m_json);
241 }
242 catch (std::exception& e)
243 {
244 throw stac_error(m_id, "catalog",
245 "STAC schema validation Error in root schema: " +
246 m_schemaUrls.catalog + ". \n\n" + e.what());
247 }
248}
249
250//if catalog matches filter requirements, return true
251bool Catalog::filter(Filters filters) {

Callers

nothing calls this directly

Calls 3

stac_errorFunction · 0.85
getJsonMethod · 0.80
whatMethod · 0.45

Tested by

no test coverage detected