returns the PROj string representation of the PROJ crs IMPORTANT: the proj context and the PROJ crs object must have been created before calling the function
| 929 | /// returns the PROj string representation of the PROJ crs |
| 930 | /// IMPORTANT: the proj context and the PROJ crs object must have been created before calling the function |
| 931 | const char* ProjParameters::get_projString_representation(bool source /*=true*/) const { |
| 932 | if (proj_ctx && ((proj_source_crs && source) || (proj_target_crs && !source))) { |
| 933 | // Retrieving and outputting the PROJ string representation |
| 934 | const char* projString = proj_as_proj_string_ptr(proj_ctx, source ? proj_source_crs : proj_target_crs, PJ_PROJ_5, nullptr); |
| 935 | if (!projString) { |
| 936 | laserror("The PROJ string representation of the PROJ CRS could not be generated."); |
| 937 | } |
| 938 | LASMessage(LAS_VERY_VERBOSE, "the PROJ string representation object was successfully created, PROJ string: '%s'", projString); |
| 939 | return projString; |
| 940 | } |
| 941 | return nullptr; |
| 942 | } |
| 943 | |
| 944 | /// returns the epsg representation of the PROJ crs |
| 945 | /// IMPORTANT: the proj context and the PROJ crs object must have been created before calling the function |
no test coverage detected