aboutsummaryrefslogtreecommitdiff
path: root/src/transformations/deformation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/transformations/deformation.cpp')
-rw-r--r--src/transformations/deformation.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/transformations/deformation.cpp b/src/transformations/deformation.cpp
index 8ce02bee..307de85f 100644
--- a/src/transformations/deformation.cpp
+++ b/src/transformations/deformation.cpp
@@ -179,7 +179,7 @@ static PJ_XYZ get_grid_shift(PJ* P, const PJ_XYZ& cartesian) {
shift.lp = pj_hgrid_value(P, Q->hgrids, geodetic.lp);
shift.enu.u = pj_vgrid_value(P, Q->vgrids, geodetic.lp, 1.0);
- if (proj_errno(P) == PJD_ERR_GRID_AREA)
+ if (proj_errno(P) == PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID)
proj_log_debug(P, "deformation: coordinate (%.3f, %.3f) outside deformation model",
proj_todeg(geodetic.lpz.lam), proj_todeg(geodetic.lpz.phi));
@@ -358,7 +358,7 @@ PJ *TRANSFORMATION(deformation,1) {
// Pass a dummy ellipsoid definition that will be overridden just afterwards
Q->cart = proj_create(P->ctx, "+proj=cart +a=1");
if (Q->cart == nullptr)
- return destructor(P, ENOMEM);
+ return destructor(P, PROJ_ERR_INVALID_OP /*ENOMEM*/);
/* inherit ellipsoid definition from P to Q->cart */
pj_inherit_ellipsoid_def (P, Q->cart);
@@ -369,8 +369,8 @@ PJ *TRANSFORMATION(deformation,1) {
/* Build gridlists. Both horizontal and vertical grids are mandatory. */
if ( !has_grids && (!has_xy_grids || !has_z_grids)) {
- proj_log_error(P, "deformation: Either +grids or (+xy_grids and +z_grids) should be specified.");
- return destructor(P, PJD_ERR_NO_ARGS );
+ proj_log_error(P, _("deformation: Either +grids or (+xy_grids and +z_grids) should be specified."));
+ return destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG );
}
if( has_grids )
@@ -378,22 +378,22 @@ PJ *TRANSFORMATION(deformation,1) {
Q->grids = pj_generic_grid_init(P, "grids");
/* Was gridlist compiled properly? */
if ( proj_errno(P) ) {
- proj_log_error(P, "deformation: could not find required grid(s).");
- return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+ proj_log_error(P, _("deformation: could not find required grid(s).)"));
+ return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID);
}
}
else
{
Q->hgrids = pj_hgrid_init(P, "xy_grids");
if (proj_errno(P)) {
- proj_log_error(P, "deformation: could not find requested xy_grid(s).");
- return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+ proj_log_error(P, _("deformation: could not find requested xy_grid(s)."));
+ return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID);
}
Q->vgrids = pj_vgrid_init(P, "z_grids");
if (proj_errno(P)) {
- proj_log_error(P, "deformation: could not find requested z_grid(s).");
- return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+ proj_log_error(P, _("deformation: could not find requested z_grid(s)."));
+ return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID);
}
}
@@ -403,8 +403,8 @@ PJ *TRANSFORMATION(deformation,1) {
}
if (pj_param_exists(P->params, "t_obs")) {
- proj_log_error(P, "deformation: +t_obs parameter is deprecated. Use +dt instead.");
- return destructor(P, PJD_ERR_MISSING_ARGS);
+ proj_log_error(P, _("deformation: +t_obs parameter is deprecated. Use +dt instead."));
+ return destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG);
}
Q->t_epoch = HUGE_VAL;
@@ -413,13 +413,13 @@ PJ *TRANSFORMATION(deformation,1) {
}
if (Q->dt == HUGE_VAL && Q->t_epoch == HUGE_VAL) {
- proj_log_error(P, "deformation: either +dt or +t_epoch needs to be set.");
- return destructor(P, PJD_ERR_MISSING_ARGS);
+ proj_log_error(P, _("deformation: either +dt or +t_epoch needs to be set."));
+ return destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG);
}
if (Q->dt != HUGE_VALL && Q->t_epoch != HUGE_VALL) {
- proj_log_error(P, "deformation: +dt or +t_epoch are mutually exclusive.");
- return destructor(P, PJD_ERR_MUTUALLY_EXCLUSIVE_ARGS);
+ proj_log_error(P, _("deformation: +dt or +t_epoch are mutually exclusive."));
+ return destructor(P, PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS);
}
P->fwd4d = forward_4d;