diff --git a/include/mapnik/projection.hpp b/include/mapnik/projection.hpp index 6dc4ad399..5b65ea8d8 100644 --- a/include/mapnik/projection.hpp +++ b/include/mapnik/projection.hpp @@ -77,7 +77,8 @@ class MAPNIK_DECL projection std::string const& params() const; void forward(double& x, double& y) const; void inverse(double& x, double& y) const; - std::string expanded() const; + std::string definition() const; + std::string description() const; void init_proj() const; private: diff --git a/src/projection.cpp b/src/projection.cpp index ceb826541..375b48db1 100644 --- a/src/projection.cpp +++ b/src/projection.cpp @@ -196,13 +196,27 @@ projection::~projection() #endif } -std::string projection::expanded() const +std::string projection::description() const { #ifdef MAPNIK_USE_PROJ if (proj_) { PJ_PROJ_INFO info = proj_pj_info(proj_); - return mapnik::util::trim_copy(info.definition); + if (std::strlen(info.description) > 0) + return mapnik::util::trim_copy(info.description); + } +#endif + return std::string("Undefined"); +} + +std::string projection::definition() const +{ +#ifdef MAPNIK_USE_PROJ + if (proj_) + { + PJ_PROJ_INFO info = proj_pj_info(proj_); + if (std::strlen(info.definition) > 0) + return mapnik::util::trim_copy(info.definition); } #endif return params_;