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

Method getVerticalUnits

pdal/SpatialReference.cpp:290–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288
289
290std::string SpatialReference::getVerticalUnits() const
291{
292 std::string tmp;
293
294 OGRScopedSpatialReference poSRS = ogrCreateSrs(m_wkt, m_epoch);
295 if (poSRS)
296 {
297 OGR_SRSNode* node = poSRS->GetAttrNode("VERT_CS");
298 if (node)
299 {
300 char* units(nullptr);
301
302 // 'units' remains internal to the OGRSpatialReference
303 // and should not be freed, or modified. It may be invalidated
304 // on the next OGRSpatialReference call.
305 (void)poSRS->GetLinearUnits(&units);
306 tmp = units;
307 Utils::trim(tmp);
308 }
309 }
310
311 return tmp;
312}
313
314
315std::string SpatialReference::getHorizontal() const

Callers

nothing calls this directly

Calls 2

ogrCreateSrsFunction · 0.85
trimFunction · 0.85

Tested by

no test coverage detected