| 540 | } |
| 541 | |
| 542 | std::string SpatialReference::getWKT1() const |
| 543 | { |
| 544 | std::string wkt = getWKT(); |
| 545 | if (wkt.empty()) |
| 546 | return wkt; |
| 547 | |
| 548 | OGRScopedSpatialReference srs = ogrCreateSrs(wkt, m_epoch); |
| 549 | std::string wkt1 = exportToWkt(srs.get(), {"FORMAT=WKT1_GDAL", "ALLOW_ELLIPSOIDAL_HEIGHT_AS_VERTICAL_CRS=YES"}); |
| 550 | if (wkt1.empty()) |
| 551 | throw pdal_error("Couldn't convert spatial reference to WKT version 1."); |
| 552 | return wkt1; |
| 553 | } |
| 554 | |
| 555 | std::string SpatialReference::getWKT2() const |
| 556 | { |
no test coverage detected