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

Function icSelfPath

io/private/stac/Utils.cpp:126–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126std::string icSelfPath(const NL::json& json)
127{
128 try
129 {
130 NL::json links = Utils::jsonValue(json, "links");
131 for (const NL::json& link: links)
132 {
133 std::string target = Utils::jsonValue<std::string>(link, "rel");
134 if (target == "self")
135 return Utils::jsonValue<std::string>(link, "href");
136 }
137 }
138 catch(std::runtime_error& )
139 {
140 return "";
141 }
142
143 return "";
144}
145
146
147}//StacUtils

Callers 1

stacValueFunction · 0.85

Calls 1

jsonValueFunction · 0.50

Tested by

no test coverage detected