Your message dated Sat, 2 Jan 2016 12:37:06 +0100 with message-id <[email protected]> and subject line Re: [Proj] Proj may give erroneous results depending on locale has caused the Debian Bug report #260375, regarding Document i18n LOCALE issue that can lead to erroneous output to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 260375: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=260375 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: proj Version: 4.4.8-2 Severity: important Hello, I have encountered bug which resulted in proj giving different results depending on locale set. As you can see in the signature my locale is pl_PL and when used with gettext (or gtk+) gives wrong coordinates after transformation. I'm attaching simple testcase that shows the problem. The bug is also occures in testing vesion of package (4.4.7) and was really hard to trace. Best Regards, Radoslaw Grzanka -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing') Architecture: i386 (i686) Kernel: Linux 2.4.25ost2 Locale: LANG=pl_PL, LC_CTYPE=pl_PL Versions of packages proj depends on: ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an -- no debconf information //// Simple testcase #include <locale.h> #include <string> #include <iostream> #include <projects.h> const std::string projparams("+x_0=115073.415747 +y_0=-6288530.367751" " +proj=lcc +lat_1=37.000000 +lat_2=65.000000 +lon_0=8.199763" " +ellps=WGS84 +to_meter=63.506519 +no_defs"); projUV proj_input; // Input Values projUV proj_output; // Output Values projPJ pj; int main() { ////////////////////////////////// //// TEST 1 - without locales set. pj = pj_init_plus(projparams.c_str()); proj_input.v = 53.5736; // Lattitude proj_input.u = 7.42731; // Longitude proj_input.v *= DEG_TO_RAD; // To Rads proj_input.u *= DEG_TO_RAD; // To Rads proj_output = pj_fwd(proj_input, pj); std::cout << "Lattitude: " << proj_output.v << " Longitude: " << proj_output.u << std::endl; pj_free(pj); //// RESULT - Lattitude: 3197.17 Longitude: 1029.99 - GOOD. /////////////////////////////////// //// TEST 2 - with locales set! setlocale (LC_ALL, ""); // SETTING LOCALES! pj = pj_init_plus(projparams.c_str()); proj_input.v = 53.5736; // Lattitude proj_input.u = 7.42731; // Longitude proj_input.v *= DEG_TO_RAD; // To Rads proj_input.u *= DEG_TO_RAD; // To Rads proj_output = pj_fwd(proj_input, pj); std::cout << "Lattitude: " << proj_output.v << " Longitude: " << proj_output.u << std::endl; pj_free(pj); //// RESULT - Lattitude: 3220.56 Longitude: 1242.12 - BAD. }
--- End Message ---
--- Begin Message ---fixed 260375 proj/4.9.2-1 thanks This ancient issue seems to have been fixed sometime after PROJ 4.4.8, with 4.9.2 the results of the test case are identical: $ LC_ALL=pl_PL.UTF-8 ./a.out Lattitude: 3197.17 Longitude: 1029.99 Lattitude: 3197.17 Longitude: 1029.99 Kind Regards, Bas -- GPG Key ID: 4096R/6750F10AE88D4AF1 Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
--- End Message ---

