diff --git a/src/proj_transform.cpp b/src/proj_transform.cpp index 51ef2032c..b2f519c0f 100644 --- a/src/proj_transform.cpp +++ b/src/proj_transform.cpp @@ -124,17 +124,20 @@ proj_transform::proj_transform(projection const& source, projection const& dest) { #ifdef MAPNIK_USE_PROJ ctx_ = proj_context_create(); + proj_log_level(ctx_, PJ_LOG_ERROR); transform_ = proj_create_crs_to_crs(ctx_, source.params().c_str(), dest.params().c_str(), nullptr); if (transform_ == nullptr) { - throw std::runtime_error(std::string("Cannot initialize proj_transform for given projections: '") + - source.params() + "'->'" + dest.params() + "'"); + throw std::runtime_error(std::string("Cannot initialize proj_transform (crs_to_crs) for given projections: '") + + source.params() + "'->'" + dest.params() + + "' because of " + std::string(proj_context_errno_string(ctx_, proj_context_errno(ctx_)))); } PJ* transform_gis = proj_normalize_for_visualization(ctx_, transform_); if (transform_gis == nullptr) { - throw std::runtime_error(std::string("Cannot initialize proj_transform for given projections: '") + - source.params() + "'->'" + dest.params() + "'"); + throw std::runtime_error(std::string("Cannot initialize proj_transform (normalize) for given projections: '") + + source.params() + "'->'" + dest.params() + + "' because of " + std::string(proj_context_errno_string(ctx_, proj_context_errno(ctx_)))); } proj_destroy(transform_); transform_ = transform_gis; diff --git a/test/unit/renderer/cairo_io.cpp b/test/unit/renderer/cairo_io.cpp index c3b739404..4f95f0d49 100644 --- a/test/unit/renderer/cairo_io.cpp +++ b/test/unit/renderer/cairo_io.cpp @@ -12,6 +12,11 @@ MAPNIK_DISABLE_WARNING_POP #include #if defined(HAVE_CAIRO) +#include + +// see https://gitlab.freedesktop.org/cairo/cairo/-/issues/553 +// TLDR: cairo has removed the writing of the svg version in cairo 1.17.6 +#if (CAIRO_VERSION_MAJOR <= 1) && (CAIRO_VERSION_MINOR <= 17) && (CAIRO_VERSION_MICRO < 6) TEST_CASE("cairo_io") { SECTION("save_to_cairo_file - SVG") @@ -33,3 +38,4 @@ TEST_CASE("cairo_io") } } #endif +#endif