20 #ifndef PROJ_WRAPPER_H
21 #define PROJ_WRAPPER_H
27 #include "pism/util/error_handling.hh"
34 Proj(
const std::string &input,
const std::string &output) {
35 m_pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, input.c_str(), output.c_str(), 0);
38 "Failed to initialize projection transformation '%s' to '%s' (errno: %d, %s).",
39 input.c_str(), output.c_str(),
41 proj_errno_string(proj_errno(0)));
Proj(const std::string &input, const std::string &output)
A wrapper for PJ that makes sure pj_destroy is called.
static RuntimeError formatted(const ErrorLocation &location, const char format[],...) __attribute__((format(printf
build a RuntimeError with a formatted message
#define PISM_ERROR_LOCATION