Coder Social home page Coder Social logo

Reset LC_NUMERIC in pj_init() about proj HOT 3 CLOSED

osgeo avatar osgeo commented on July 22, 2024
Reset LC_NUMERIC in pj_init()

from proj.

Comments (3)

proj4-bot avatar proj4-bot commented on July 22, 2024

Comment by grisxa on 4 Sep 2009 13:18 UTC
I should also explain, how this bug happens.

Several multi-lingual applications, like QLandkarteGT, call pj_init() and pj_transform() internally. If projection is specified in form "+init=epsg:2393", file /usr/share/proj/epsg is parsed and datum parameters for 2393 are used. But they are stored with a dot as decimal point, while pj_init() already operates locale-specific decimal point (comma in my case). So atof() rounds float numbers to integers (it stops parsing at first dot met).
That is why I suggest to reset LC_NUMERIC.

As far as I can see, console utils from proj.4 don't have such issue, probably because they are not localized (don't use setlocale()).

from proj.

proj4-bot avatar proj4-bot commented on July 22, 2024

Comment by warmerdam on 24 Sep 2009 02:14 UTC
I concur with your analysis and I have applied just a slight variation on the patch in trunk (a26eedd4 (SVN rev1630)).

from proj.

proj4-bot avatar proj4-bot commented on July 22, 2024

Attachment added by grisxa on 4 Sep 2009 01:18 UTC
https://trac.osgeo.org/proj/attachment/ticket/49/proj-4.6.1.diff

from proj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.