| 244 | |
| 245 | |
| 246 | std::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 | |
| 266 | std::string SpatialReference::getVertical() const |