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

Method getProj4

pdal/SpatialReference.cpp:246–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244
245
246std::string SpatialReference::getProj4() const
247{
248 std::string tmp;
249
250 const char* poWKT = m_wkt.c_str();
251
252 OGRSpatialReference srs(NULL);
253 if (OGRERR_NONE == srs.importFromWkt(const_cast<char **>(&poWKT)))
254 {
255 char* proj4 = nullptr;
256 srs.exportToProj4(&proj4);
257 tmp = proj4;
258 CPLFree(proj4);
259 Utils::trim(tmp);
260 }
261
262 return tmp;
263}
264
265
266std::string SpatialReference::getVertical() const

Callers 2

TESTFunction · 0.80

Calls 1

trimFunction · 0.85

Tested by 1

TESTFunction · 0.64