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

Function exportToWkt

pdal/SpatialReference.cpp:73–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73std::string exportToWkt(OGRSpatialReference* srs, const std::vector<std::string>& options = {})
74{
75 std::string wkt;
76 if (!srs)
77 return wkt;
78
79 // Make one more pointer than option to terminate the list with a nullptr.
80 std::vector<const char *> copts(options.size() + 1, nullptr);
81 for (size_t i = 0; i < options.size(); ++i)
82 copts[i] = options[i].c_str();
83
84 char *buf = nullptr;
85 srs->exportToWkt(&buf, copts.data());
86 if (buf)
87 {
88 wkt = buf;
89 CPLFree(buf);
90 }
91 return wkt;
92}
93
94}
95

Callers 4

setMethod · 0.85
getHorizontalMethod · 0.85
prettyWktMethod · 0.85
getWKT1Method · 0.85

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected