src/proj_transform.cpp: only use proj_context_errno_string for proj >= 8.0.0
This commit is contained in:
parent
5c06098caf
commit
01e018eb0a
1 changed files with 8 additions and 0 deletions
|
@ -130,14 +130,22 @@ proj_transform::proj_transform(projection const& source, projection const& dest)
|
||||||
{
|
{
|
||||||
throw std::runtime_error(std::string("Cannot initialize proj_transform (crs_to_crs) for given projections: '") +
|
throw std::runtime_error(std::string("Cannot initialize proj_transform (crs_to_crs) for given projections: '") +
|
||||||
source.params() + "'->'" + dest.params() +
|
source.params() + "'->'" + dest.params() +
|
||||||
|
#if MAPNIK_PROJ_VERSION >= 80000
|
||||||
"' because of " + std::string(proj_context_errno_string(ctx_, proj_context_errno(ctx_))));
|
"' because of " + std::string(proj_context_errno_string(ctx_, proj_context_errno(ctx_))));
|
||||||
|
#else
|
||||||
|
"'");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
PJ* transform_gis = proj_normalize_for_visualization(ctx_, transform_);
|
PJ* transform_gis = proj_normalize_for_visualization(ctx_, transform_);
|
||||||
if (transform_gis == nullptr)
|
if (transform_gis == nullptr)
|
||||||
{
|
{
|
||||||
throw std::runtime_error(std::string("Cannot initialize proj_transform (normalize) for given projections: '") +
|
throw std::runtime_error(std::string("Cannot initialize proj_transform (normalize) for given projections: '") +
|
||||||
source.params() + "'->'" + dest.params() +
|
source.params() + "'->'" + dest.params() +
|
||||||
|
#if MAPNIK_PROJ_VERSION >= 80000
|
||||||
"' because of " + std::string(proj_context_errno_string(ctx_, proj_context_errno(ctx_))));
|
"' because of " + std::string(proj_context_errno_string(ctx_, proj_context_errno(ctx_))));
|
||||||
|
#else
|
||||||
|
"'");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
proj_destroy(transform_);
|
proj_destroy(transform_);
|
||||||
transform_ = transform_gis;
|
transform_ = transform_gis;
|
||||||
|
|
Loading…
Reference in a new issue