/
| 177 | |
| 178 | /**************************************************************************************/ |
| 179 | void pj_warn_about_missing_grid(PJ *P) |
| 180 | /**************************************************************************************/ |
| 181 | { |
| 182 | std::string msg("Attempt to use coordinate operation "); |
| 183 | msg += proj_get_name(P); |
| 184 | msg += " failed."; |
| 185 | int gridUsed = proj_coordoperation_get_grid_used_count(P->ctx, P); |
| 186 | for (int i = 0; i < gridUsed; ++i) { |
| 187 | const char *gridName = ""; |
| 188 | int available = FALSE; |
| 189 | if (proj_coordoperation_get_grid_used(P->ctx, P, i, &gridName, nullptr, |
| 190 | nullptr, nullptr, nullptr, |
| 191 | nullptr, &available) && |
| 192 | !available) { |
| 193 | msg += " Grid "; |
| 194 | msg += gridName; |
| 195 | msg += " is not available. " |
| 196 | "Consult https://proj.org/resource_files.html for guidance."; |
| 197 | } |
| 198 | } |
| 199 | if (!P->errorIfBestTransformationNotAvailable && |
| 200 | P->warnIfBestTransformationNotAvailable) { |
| 201 | msg += " This might become an error in a future PROJ major release. " |
| 202 | "Set the ONLY_BEST option to YES or NO. " |
| 203 | "This warning will no longer be emitted (for the current " |
| 204 | "transformation instance)."; |
| 205 | P->warnIfBestTransformationNotAvailable = false; |
| 206 | } |
| 207 | pj_log(P->ctx, |
| 208 | P->errorIfBestTransformationNotAvailable ? PJ_LOG_ERROR |
| 209 | : PJ_LOG_DEBUG, |
| 210 | msg.c_str()); |
| 211 | } |
| 212 | |
| 213 | /**************************************************************************************/ |
| 214 | PJ_COORD proj_trans(PJ *P, PJ_DIRECTION direction, PJ_COORD coord) { |
no test coverage detected