| 264 | |
| 265 | |
| 266 | std::string SpatialReference::getVertical() const |
| 267 | { |
| 268 | std::string tmp; |
| 269 | |
| 270 | OGRScopedSpatialReference poSRS = ogrCreateSrs(m_wkt, m_epoch); |
| 271 | |
| 272 | // Above can fail if m_wkt is bad. |
| 273 | if (!poSRS) |
| 274 | return tmp; |
| 275 | |
| 276 | char *pszWKT = NULL; |
| 277 | |
| 278 | OGR_SRSNode* node = poSRS->GetAttrNode("VERT_CS"); |
| 279 | if (node && poSRS) |
| 280 | { |
| 281 | node->exportToWkt(&pszWKT); |
| 282 | tmp = pszWKT; |
| 283 | CPLFree(pszWKT); |
| 284 | } |
| 285 | |
| 286 | return tmp; |
| 287 | } |
| 288 | |
| 289 | |
| 290 | std::string SpatialReference::getVerticalUnits() const |