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

Method getWKT1

pdal/SpatialReference.cpp:542–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542std::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
555std::string SpatialReference::getWKT2() const
556{

Callers 2

addWktVlrMethod · 0.80
addWktVlrMethod · 0.80

Calls 5

getWKTFunction · 0.85
ogrCreateSrsFunction · 0.85
exportToWktFunction · 0.85
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected