| 288 | |
| 289 | |
| 290 | std::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 | |
| 315 | std::string SpatialReference::getHorizontal() const |
nothing calls this directly
no test coverage detected