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;
|
||||
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:
|
||||
|
|
|
@ -196,12 +196,26 @@ 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_);
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue