diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-12-15 15:32:40 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-12-15 17:24:55 +0100 |
| commit | df96a13d2c9b70bc18cec1b08eea5b2b068127d7 (patch) | |
| tree | 23b27e2ea8e5bd48cf23e545d89669c982b60f2a | |
| parent | ab7b02702a25689a2dd81b25fc859424a2ffcec9 (diff) | |
| download | PROJ-df96a13d2c9b70bc18cec1b08eea5b2b068127d7.tar.gz PROJ-df96a13d2c9b70bc18cec1b08eea5b2b068127d7.zip | |
Various operations: remove explicit short name prefixing in log messages now that it is automatically added
| -rw-r--r-- | src/conversions/axisswap.cpp | 6 | ||||
| -rw-r--r-- | src/conversions/topocentric.cpp | 8 | ||||
| -rw-r--r-- | src/conversions/unitconvert.cpp | 16 | ||||
| -rw-r--r-- | src/transformations/affine.cpp | 2 | ||||
| -rw-r--r-- | src/transformations/defmodel.cpp | 36 | ||||
| -rw-r--r-- | src/transformations/deformation.cpp | 24 | ||||
| -rw-r--r-- | src/transformations/hgridshift.cpp | 4 | ||||
| -rw-r--r-- | src/transformations/horner.cpp | 24 | ||||
| -rw-r--r-- | src/transformations/molodensky.cpp | 10 | ||||
| -rw-r--r-- | src/transformations/tinshift.cpp | 10 | ||||
| -rw-r--r-- | src/transformations/vgridshift.cpp | 4 | ||||
| -rw-r--r-- | src/transformations/xyzgridshift.cpp | 6 |
12 files changed, 72 insertions, 78 deletions
diff --git a/src/conversions/axisswap.cpp b/src/conversions/axisswap.cpp index c02bd4e5..33d0937c 100644 --- a/src/conversions/axisswap.cpp +++ b/src/conversions/axisswap.cpp @@ -199,7 +199,7 @@ PJ *CONVERSION(axisswap,0) { /* check that all characters are valid */ for (i=0; i<strlen(order); i++) if (strchr("1234-,", order[i]) == nullptr) { - proj_log_error(P, _("axisswap: unknown axis '%c'"), order[i]); + proj_log_error(P, _("unknown axis '%c'"), order[i]); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } @@ -209,7 +209,7 @@ PJ *CONVERSION(axisswap,0) { while ( *s != '\0' && n < 4 ) { Q->axis[n] = abs(atoi(s))-1; if (Q->axis[n] > 3) { - proj_log_error(P, _("axisswap: invalid axis '%d'"), Q->axis[n]); + proj_log_error(P, _("invalid axis '%d'"), Q->axis[n]); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } Q->sign[n++] = sign(atoi(s)); @@ -250,7 +250,7 @@ PJ *CONVERSION(axisswap,0) { Q->axis[i] = 2; break; default: - proj_log_error(P, _("axisswap: unknown axis '%c'"), P->axis[i]); + proj_log_error(P, _("unknown axis '%c'"), P->axis[i]); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } } diff --git a/src/conversions/topocentric.cpp b/src/conversions/topocentric.cpp index 4f563d9f..88119efa 100644 --- a/src/conversions/topocentric.cpp +++ b/src/conversions/topocentric.cpp @@ -97,23 +97,23 @@ PJ *CONVERSION(topocentric,1) { const auto hash0 = pj_param_exists(P->params, "h_0"); if( !hasX0 && !hasLon0 ) { - proj_log_error(P, _("topocentric: missing X_0 or lon_0")); + proj_log_error(P, _("missing X_0 or lon_0")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG); } if ( (hasX0 || hasY0 || hasZ0) && (hasLon0 || hasLat0 || hash0) ) { - proj_log_error(P, _("topocentric: (X_0,Y_0,Z_0) and (lon_0,lat_0,h_0) are mutually exclusive")); + proj_log_error(P, _("(X_0,Y_0,Z_0) and (lon_0,lat_0,h_0) are mutually exclusive")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS); } if( hasX0 && (!hasY0 || !hasZ0) ) { - proj_log_error(P, _("topocentric: missing Y_0 and/or Z_0")); + proj_log_error(P, _("missing Y_0 and/or Z_0")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG); } if( hasLon0 && !hasLat0 ) // allow missing h_0 { - proj_log_error(P, _("topocentric: missing lat_0")); + proj_log_error(P, _("missing lat_0")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG); } diff --git a/src/conversions/unitconvert.cpp b/src/conversions/unitconvert.cpp index fec8caac..58a60c37 100644 --- a/src/conversions/unitconvert.cpp +++ b/src/conversions/unitconvert.cpp @@ -474,7 +474,7 @@ PJ *CONVERSION(unitconvert,0) { f = pj_param (P->ctx, P->params, "dxy_in").f; if (f == 0.0 || 1.0 / f == 0.0) { - proj_log_error(P, _("unitconvert: unknown xy_in unit")); + proj_log_error(P, _("unknown xy_in unit")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } } @@ -496,7 +496,7 @@ PJ *CONVERSION(unitconvert,0) { f = pj_param (P->ctx, P->params, "dxy_out").f; if (f == 0.0 || 1.0 / f == 0.0) { - proj_log_error(P, _("unitconvert: unknown xy_out unit")); + proj_log_error(P, _("unknown xy_out unit")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } } @@ -511,7 +511,7 @@ PJ *CONVERSION(unitconvert,0) { if( xy_in_is_linear >= 0 && xy_out_is_linear >= 0 && xy_in_is_linear != xy_out_is_linear ) { - proj_log_error(P, _("unitconvert: inconsistent unit type between xy_in and xy_out")); + proj_log_error(P, _("inconsistent unit type between xy_in and xy_out")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } @@ -524,7 +524,7 @@ PJ *CONVERSION(unitconvert,0) { f = pj_param (P->ctx, P->params, "dz_in").f; if (f == 0.0 || 1.0 / f == 0.0) { - proj_log_error(P, _("unitconvert: unknown z_in unit")); + proj_log_error(P, _("unknown z_in unit")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } } @@ -540,7 +540,7 @@ PJ *CONVERSION(unitconvert,0) { f = pj_param (P->ctx, P->params, "dz_out").f; if (f == 0.0 || 1.0 / f == 0.0) { - proj_log_error(P, _("unitconvert: unknown z_out unit")); + proj_log_error(P, _("unknown z_out unit")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } } @@ -549,7 +549,7 @@ PJ *CONVERSION(unitconvert,0) { if( z_in_is_linear >= 0 && z_out_is_linear >= 0 && z_in_is_linear != z_out_is_linear ) { - proj_log_error(P, _("unitconvert: inconsistent unit type between z_in and z_out")); + proj_log_error(P, _("inconsistent unit type between z_in and z_out")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } @@ -558,7 +558,7 @@ PJ *CONVERSION(unitconvert,0) { if (!s) { - proj_log_error(P, _("unitconvert: unknown t_in unit")); + proj_log_error(P, _("unknown t_in unit")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } @@ -572,7 +572,7 @@ PJ *CONVERSION(unitconvert,0) { if (!s) { - proj_log_error(P, _("unitconvert: unknown t_out unit")); + proj_log_error(P, _("unknown t_out unit")); return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } diff --git a/src/transformations/affine.cpp b/src/transformations/affine.cpp index 8b927688..39fbb615 100644 --- a/src/transformations/affine.cpp +++ b/src/transformations/affine.cpp @@ -154,7 +154,7 @@ static void computeReverseParameters(PJ* P) const double det = a * A + b * B + c * C; if( det == 0.0 || Q->forward.tscale == 0.0 ) { if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_DEBUG) { - proj_log_debug(P, "Affine: matrix non invertible"); + proj_log_debug(P, "matrix non invertible"); } P->inv4d = nullptr; P->inv3d = nullptr; diff --git a/src/transformations/defmodel.cpp b/src/transformations/defmodel.cpp index 89e0429f..2ae8aec8 100644 --- a/src/transformations/defmodel.cpp +++ b/src/transformations/defmodel.cpp @@ -68,8 +68,7 @@ struct Grid : public GridPrototype { if (!checkedHorizontal) { const auto samplesPerPixel = realGrid->samplesPerPixel(); if (samplesPerPixel < 2) { - pj_log(ctx, PJ_LOG_ERROR, - "defmodel: grid %s has not enough samples", + pj_log(ctx, PJ_LOG_ERROR, "grid %s has not enough samples", realGrid->name().c_str()); return false; } @@ -90,15 +89,14 @@ struct Grid : public GridPrototype { } } if (foundDesc && (!foundDescX || !foundDescY)) { - pj_log(ctx, PJ_LOG_ERROR, - "defmodel: grid %s : Found band description, " - "but not the ones expected", + pj_log(ctx, PJ_LOG_ERROR, "grid %s : Found band description, " + "but not the ones expected", realGrid->name().c_str()); return false; } const auto unit = realGrid->unit(sampleX); if (!unit.empty() && unit != expectedUnit) { - pj_log(ctx, PJ_LOG_ERROR, "defmodel: grid %s : Only unit=%s " + pj_log(ctx, PJ_LOG_ERROR, "grid %s : Only unit=%s " "currently handled for this mode", realGrid->name().c_str(), expectedUnit.c_str()); return false; @@ -130,8 +128,7 @@ struct Grid : public GridPrototype { if (samplesPerPixel == 1) { sampleZ = 0; } else if (samplesPerPixel < 3) { - pj_log(ctx, PJ_LOG_ERROR, - "defmodel: grid %s has not enough samples", + pj_log(ctx, PJ_LOG_ERROR, "grid %s has not enough samples", realGrid->name().c_str()); return false; } @@ -148,17 +145,15 @@ struct Grid : public GridPrototype { } } if (foundDesc && !foundDescZ) { - pj_log(ctx, PJ_LOG_ERROR, - "defmodel: grid %s : Found band description, " - "but not the ones expected", + pj_log(ctx, PJ_LOG_ERROR, "grid %s : Found band description, " + "but not the ones expected", realGrid->name().c_str()); return false; } const auto unit = realGrid->unit(sampleZ); if (!unit.empty() && unit != STR_METRE) { - pj_log(ctx, PJ_LOG_ERROR, - "defmodel: grid %s : Only unit=metre currently " - "handled for this mode", + pj_log(ctx, PJ_LOG_ERROR, "grid %s : Only unit=metre currently " + "handled for this mode", realGrid->name().c_str()); return false; } @@ -256,8 +251,7 @@ struct EvaluatorIface : public EvaluatorIfacePrototype<Grid, GridSet> { std::unique_ptr<GridSet> open(const std::string &filename) { auto realGridSet = NS_PROJ::GenericShiftGridSet::open(ctx, filename); if (!realGridSet) { - pj_log(ctx, PJ_LOG_ERROR, "defmodel: cannot open %s", - filename.c_str()); + pj_log(ctx, PJ_LOG_ERROR, "cannot open %s", filename.c_str()); return nullptr; } return std::unique_ptr<GridSet>( @@ -402,13 +396,13 @@ PJ *TRANSFORMATION(defmodel, 1) { const char *model = pj_param(P->ctx, P->params, "smodel").s; if (!model) { - proj_log_error(P, _("defmodel: +model= should be specified.")); + proj_log_error(P, _("+model= should be specified.")); return destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG); } auto file = NS_PROJ::FileManager::open_resource_file(P->ctx, model); if (nullptr == file) { - proj_log_error(P, _("defmodel: Cannot open %s"), model); + proj_log_error(P, _("Cannot open %s"), model); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } file->seek(0, SEEK_END); @@ -417,14 +411,14 @@ PJ *TRANSFORMATION(defmodel, 1) { // that could be a denial of service risk. 10 MB should be sufficiently // large for any valid use ! if (size > 10 * 1024 * 1024) { - proj_log_error(P, _("defmodel: File %s too large"), model); + proj_log_error(P, _("File %s too large"), model); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } file->seek(0); std::string jsonStr; jsonStr.resize(static_cast<size_t>(size)); if (file->read(&jsonStr[0], jsonStr.size()) != jsonStr.size()) { - proj_log_error(P, _("defmodel: Cannot read %s"), model); + proj_log_error(P, _("Cannot read %s"), model); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } @@ -432,7 +426,7 @@ PJ *TRANSFORMATION(defmodel, 1) { Q->evaluator.reset(new Evaluator<Grid, GridSet, EvaluatorIface>( MasterFile::parse(jsonStr), Q->evaluatorIface, P->a, P->b)); } catch (const std::exception &e) { - proj_log_error(P, _("defmodel: invalid model: %s"), e.what()); + proj_log_error(P, _("invalid model: %s"), e.what()); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } diff --git a/src/transformations/deformation.cpp b/src/transformations/deformation.cpp index 307de85f..56909eb2 100644 --- a/src/transformations/deformation.cpp +++ b/src/transformations/deformation.cpp @@ -100,7 +100,7 @@ static bool get_grid_values(PJ* P, } const auto samplesPerPixel = grid->samplesPerPixel(); if( samplesPerPixel < 3 ) { - proj_log_error(P, "deformation: grid has not enough samples"); + proj_log_error(P, "grid has not enough samples"); return false; } int sampleE = 0; @@ -119,7 +119,7 @@ static bool get_grid_values(PJ* P, } const auto unit = grid->unit(sampleE); if( !unit.empty() && unit != "millimetres per year" ) { - proj_log_error(P, "deformation: Only unit=millimetres per year currently handled"); + proj_log_error(P, "Only unit=millimetres per year currently handled"); return false; } @@ -180,7 +180,7 @@ static PJ_XYZ get_grid_shift(PJ* P, const PJ_XYZ& cartesian) { shift.enu.u = pj_vgrid_value(P, Q->vgrids, geodetic.lp, 1.0); if (proj_errno(P) == PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID) - proj_log_debug(P, "deformation: coordinate (%.3f, %.3f) outside deformation model", + proj_log_debug(P, "coordinate (%.3f, %.3f) outside deformation model", proj_todeg(geodetic.lpz.lam), proj_todeg(geodetic.lpz.phi)); /* grid values are stored as mm/yr, we need m/yr */ @@ -261,7 +261,7 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { if (Q->dt == HUGE_VAL) { out = proj_coord_error(); /* in the 3D case +t_obs must be specified */ - proj_log_debug(P, "deformation: +dt must be specified"); + proj_log_debug(P, "+dt must be specified"); return out.xyz; } @@ -308,7 +308,7 @@ static PJ_LPZ reverse_3d(PJ_XYZ in, PJ *P) { if (Q->dt == HUGE_VAL) { out = proj_coord_error(); /* in the 3D case +t_obs must be specified */ - proj_log_debug(P, "deformation: +dt must be specified"); + proj_log_debug(P, "+dt must be specified"); return out.lpz; } @@ -369,7 +369,7 @@ 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.")); + proj_log_error(P, _("Either +grids or (+xy_grids and +z_grids) should be specified.")); return destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG ); } @@ -378,7 +378,7 @@ 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).)")); + proj_log_error(P, _("could not find required grid(s).)")); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } } @@ -386,13 +386,13 @@ PJ *TRANSFORMATION(deformation,1) { { Q->hgrids = pj_hgrid_init(P, "xy_grids"); if (proj_errno(P)) { - proj_log_error(P, _("deformation: could not find requested xy_grid(s).")); + proj_log_error(P, _("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).")); + proj_log_error(P, _("could not find requested z_grid(s).")); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } } @@ -403,7 +403,7 @@ 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.")); + proj_log_error(P, _("+t_obs parameter is deprecated. Use +dt instead.")); return destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG); } @@ -413,12 +413,12 @@ 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.")); + proj_log_error(P, _("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.")); + proj_log_error(P, _("+dt or +t_epoch are mutually exclusive.")); return destructor(P, PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS); } diff --git a/src/transformations/hgridshift.cpp b/src/transformations/hgridshift.cpp index 1b2ff9b1..326bbb13 100644 --- a/src/transformations/hgridshift.cpp +++ b/src/transformations/hgridshift.cpp @@ -155,7 +155,7 @@ PJ *TRANSFORMATION(hgridshift,0) { P->right = PJ_IO_UNITS_RADIANS; if (0==pj_param(P->ctx, P->params, "tgrids").i) { - proj_log_error(P, _("hgridshift: +grids parameter missing.")); + proj_log_error(P, _("+grids parameter missing.")); return destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } @@ -194,7 +194,7 @@ PJ *TRANSFORMATION(hgridshift,0) { Q->grids = pj_hgrid_init(P, "grids"); /* Was gridlist compiled properly? */ if ( proj_errno(P) ) { - proj_log_error(P, _("hgridshift: could not find required grid(s).")); + proj_log_error(P, _("could not find required grid(s).")); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } diff --git a/src/transformations/horner.cpp b/src/transformations/horner.cpp index d88ea152..e32a6b99 100644 --- a/src/transformations/horner.cpp +++ b/src/transformations/horner.cpp @@ -414,7 +414,7 @@ static int parse_coefs (PJ *P, double *coefs, const char *param, int ncoefs) { buf = static_cast<char*>(calloc (strlen (param) + 2, sizeof(char))); if (nullptr==buf) { - proj_log_error (P, "Horner: No memory left"); + proj_log_error (P, "No memory left"); return 0; } @@ -430,7 +430,7 @@ static int parse_coefs (PJ *P, double *coefs, const char *param, int ncoefs) { for (i = 0; i < ncoefs; i++) { if (i > 0) { if ( next == nullptr || ','!=*next) { - proj_log_error (P, "Horner: Malformed polynomium set %s. need %d coefs", param, ncoefs); + proj_log_error (P, "Malformed polynomium set %s. need %d coefs", param, ncoefs); return 0; } init = ++next; @@ -460,11 +460,11 @@ PJ *PROJECTION(horner) { degree = pj_param(P->ctx, P->params, "ideg").i; if (degree < 0 || degree > 10000) { /* What are reasonable minimum and maximums for degree? */ - proj_log_error (P, _("Horner: Degree is unreasonable: %d"), degree); + proj_log_error (P, _("Degree is unreasonable: %d"), degree); return horner_freeup (P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } } else { - proj_log_error (P, _("Horner: Must specify polynomial degree, (+deg=n)")); + proj_log_error (P, _("Must specify polynomial degree, (+deg=n)")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } @@ -484,12 +484,12 @@ PJ *PROJECTION(horner) { n = 2*degree + 2; if (0==parse_coefs (P, Q->fwd_c, "fwd_c", n)) { - proj_log_error (P, _("Horner: missing fwd_c")); + proj_log_error (P, _("missing fwd_c")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } if (0==parse_coefs (P, Q->inv_c, "inv_c", n)) { - proj_log_error (P, _("Horner: missing inv_c")); + proj_log_error (P, _("missing inv_c")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } P->fwd4d = complex_horner_forward_4d; @@ -500,34 +500,34 @@ PJ *PROJECTION(horner) { n = horner_number_of_coefficients (degree); if (0==parse_coefs (P, Q->fwd_u, "fwd_u", n)) { - proj_log_error (P, _("Horner: missing fwd_u")); + proj_log_error (P, _("missing fwd_u")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } if (0==parse_coefs (P, Q->fwd_v, "fwd_v", n)) { - proj_log_error (P, _("Horner: missing fwd_v")); + proj_log_error (P, _("missing fwd_v")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } if (0==parse_coefs (P, Q->inv_u, "inv_u", n)) { - proj_log_error (P, _("Horner: missing inv_u")); + proj_log_error (P, _("missing inv_u")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } if (0==parse_coefs (P, Q->inv_v, "inv_v", n)) { - proj_log_error (P, _("Horner: missing inv_v")); + proj_log_error (P, _("missing inv_v")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } } if (0==parse_coefs (P, (double *)(Q->fwd_origin), "fwd_origin", 2)) { - proj_log_error (P, _("Horner: missing fwd_origin")); + proj_log_error (P, _("missing fwd_origin")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } if (0==parse_coefs (P, (double *)(Q->inv_origin), "inv_origin", 2)) { - proj_log_error (P, _("Horner: missing inv_origin")); + proj_log_error (P, _("missing inv_origin")); return horner_freeup (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } if (0==parse_coefs (P, &Q->range, "range", 1)) diff --git a/src/transformations/molodensky.cpp b/src/transformations/molodensky.cpp index 4a6584a9..2d173ac6 100644 --- a/src/transformations/molodensky.cpp +++ b/src/transformations/molodensky.cpp @@ -315,35 +315,35 @@ PJ *TRANSFORMATION(molodensky,1) { /* read args */ if (!pj_param(P->ctx, P->params, "tdx").i) { - proj_log_error (P, _("molodensky: missing dx")); + proj_log_error (P, _("missing dx")); return pj_default_destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } Q->dx = pj_param(P->ctx, P->params, "ddx").f; if (!pj_param(P->ctx, P->params, "tdy").i) { - proj_log_error (P, _("molodensky: missing dy")); + proj_log_error (P, _("missing dy")); return pj_default_destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } Q->dy = pj_param(P->ctx, P->params, "ddy").f; if (!pj_param(P->ctx, P->params, "tdz").i) { - proj_log_error (P, _("molodensky: missing dz")); + proj_log_error (P, _("missing dz")); return pj_default_destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } Q->dz = pj_param(P->ctx, P->params, "ddz").f; if (!pj_param(P->ctx, P->params, "tda").i) { - proj_log_error (P, _("molodensky: missing da")); + proj_log_error (P, _("missing da")); return pj_default_destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } Q->da = pj_param(P->ctx, P->params, "dda").f; if (!pj_param(P->ctx, P->params, "tdf").i) { - proj_log_error (P, _("molodensky: missing df")); + proj_log_error (P, _("missing df")); return pj_default_destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } Q->df = pj_param(P->ctx, P->params, "ddf").f; diff --git a/src/transformations/tinshift.cpp b/src/transformations/tinshift.cpp index 8b73c28c..51e063eb 100644 --- a/src/transformations/tinshift.cpp +++ b/src/transformations/tinshift.cpp @@ -86,13 +86,13 @@ PJ *TRANSFORMATION(tinshift, 1) { const char *filename = pj_param(P->ctx, P->params, "sfile").s; if (!filename) { - proj_log_error(P, _("tinshift: +file= should be specified.")); + proj_log_error(P, _("+file= should be specified.")); return destructor(P, PROJ_ERR_INVALID_OP_MISSING_ARG); } auto file = NS_PROJ::FileManager::open_resource_file(P->ctx, filename); if (nullptr == file) { - proj_log_error(P, _("tinshift: Cannot open %s"), filename); + proj_log_error(P, _("Cannot open %s"), filename); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } file->seek(0, SEEK_END); @@ -101,14 +101,14 @@ PJ *TRANSFORMATION(tinshift, 1) { // that could be a denial of service risk. 10 MB should be sufficiently // large for any valid use ! if (size > 10 * 1024 * 1024) { - proj_log_error(P, _("tinshift: File %s too large"), filename); + proj_log_error(P, _("File %s too large"), filename); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } file->seek(0); std::string jsonStr; jsonStr.resize(static_cast<size_t>(size)); if (file->read(&jsonStr[0], jsonStr.size()) != jsonStr.size()) { - proj_log_error(P, _("tinshift: Cannot read %s"), filename); + proj_log_error(P, _("Cannot read %s"), filename); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } @@ -119,7 +119,7 @@ PJ *TRANSFORMATION(tinshift, 1) { try { Q->evaluator.reset(new Evaluator(TINShiftFile::parse(jsonStr))); } catch (const std::exception &e) { - proj_log_error(P, _("tinshift: invalid model: %s"), e.what()); + proj_log_error(P, _("invalid model: %s"), e.what()); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } diff --git a/src/transformations/vgridshift.cpp b/src/transformations/vgridshift.cpp index b85e4ba4..7b234517 100644 --- a/src/transformations/vgridshift.cpp +++ b/src/transformations/vgridshift.cpp @@ -179,7 +179,7 @@ PJ *TRANSFORMATION(vgridshift,0) { P->reassign_context = reassign_context; if (!pj_param(P->ctx, P->params, "tgrids").i) { - proj_log_error(P, _("hgridshift: +grids parameter missing.")); + proj_log_error(P, _("+grids parameter missing.")); return destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } @@ -227,7 +227,7 @@ PJ *TRANSFORMATION(vgridshift,0) { /* Was gridlist compiled properly? */ if ( proj_errno(P) ) { - proj_log_error(P, _("vgridshift: could not find required grid(s).")); + proj_log_error(P, _("could not find required grid(s).")); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } diff --git a/src/transformations/xyzgridshift.cpp b/src/transformations/xyzgridshift.cpp index d00d6484..e11a4863 100644 --- a/src/transformations/xyzgridshift.cpp +++ b/src/transformations/xyzgridshift.cpp @@ -272,13 +272,13 @@ PJ *TRANSFORMATION(xyzgridshift,0) { // in RGF93 Q->grid_ref_is_input = false; } else { - proj_log_error(P, _("xyzgridshift: unusupported value for grid_ref")); + proj_log_error(P, _("unusupported value for grid_ref")); return destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } } if (0==pj_param(P->ctx, P->params, "tgrids").i) { - proj_log_error(P, _("xyzgridshift: +grids parameter missing.")); + proj_log_error(P, _("+grids parameter missing.")); return destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } @@ -294,7 +294,7 @@ PJ *TRANSFORMATION(xyzgridshift,0) { Q->grids = pj_generic_grid_init(P, "grids"); /* Was gridlist compiled properly? */ if ( proj_errno(P) ) { - proj_log_error(P, _("xyzgridshift: could not find required grid(s).")); + proj_log_error(P, _("could not find required grid(s).")); return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } } |
