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

Method getHorizontalUnits

pdal/SpatialReference.cpp:331–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329
330
331std::string SpatialReference::getHorizontalUnits() const
332{
333 OGRScopedSpatialReference poSRS = ogrCreateSrs(m_wkt, m_epoch);
334
335 if (!poSRS)
336 return std::string();
337
338 char* units(nullptr);
339
340 // The returned value remains internal to the OGRSpatialReference
341 // and should not be freed, or modified. It may be invalidated on
342 // the next OGRSpatialReference call.
343 double u = poSRS->GetLinearUnits(&units);
344 std::string tmp(units);
345 Utils::trim(tmp);
346 return tmp;
347}
348
349
350bool SpatialReference::equals(const SpatialReference& input) const

Callers

nothing calls this directly

Calls 2

ogrCreateSrsFunction · 0.85
trimFunction · 0.85

Tested by

no test coverage detected