projection - rename 'expanded' to 'definition' (PJ_PROJ_INFO) + add 'description' method
This commit is contained in:
parent
ce073c64c7
commit
8efaa959f0
2 changed files with 18 additions and 3 deletions
|
@ -77,7 +77,8 @@ class MAPNIK_DECL projection
|
||||||
std::string const& params() const;
|
std::string const& params() const;
|
||||||
void forward(double& x, double& y) const;
|
void forward(double& x, double& y) const;
|
||||||
void inverse(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;
|
void init_proj() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -196,13 +196,27 @@ projection::~projection()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string projection::expanded() const
|
std::string projection::description() const
|
||||||
{
|
{
|
||||||
#ifdef MAPNIK_USE_PROJ
|
#ifdef MAPNIK_USE_PROJ
|
||||||
if (proj_)
|
if (proj_)
|
||||||
{
|
{
|
||||||
PJ_PROJ_INFO info = proj_pj_info(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
|
#endif
|
||||||
return params_;
|
return params_;
|
||||||
|
|
Loading…
Add table
Reference in a new issue