GithubHelp home page GithubHelp logo

CTABLEs are arch dependent about proj HOT 5 CLOSED

osgeo avatar osgeo commented on August 27, 2024
CTABLEs are arch dependent

from proj.

Comments (5)

proj4-bot avatar proj4-bot commented on August 27, 2024

Comment by hawkinsp on 7 Aug 2010 20:38 UTC
The fact that the CTABLE files are architecture dependent causes surprising results on Mac OS. It is common to build "universal binaries" on Mac OS, where multiple architectures are combined into the same binary (e.g. x86 and x86-64). Unfortunately the datum shift files are not compatible between architectures, so a universal binary will silently produce invalid datum shift transformations on at least one architecture. This is particularly confusing on Snow Leopard, under which recent machines can execute both x86-64 and x86 binaries.

I just spent some hours hunting for invalid datum shifts in my code; I had been using grids generated for x86-64 together with a binary built for x86 on the same machine. Since sizeof(int) == 4 on x86 and sizeof(int) == 8 on x86-64, the CTABLEs (in particular the layout of struct ILP) are incompatible even though both are from the same machine. It would be good to at least document this behavior if not to fix it.

I note that the Macports build of proj4 incorrectly builds only one set of datum shifts for a universal binary, so clearly I'm not the only one who didn't realize this.

from proj.

busstoptaktik avatar busstoptaktik commented on August 27, 2024

Can this be closed? Are all PROJ.4 distributed files now arch independent CTABLE2 versions?

from proj.

kbevers avatar kbevers commented on August 27, 2024

As far as I can tell, yes. We should also consider removing the code that reads the arch-dependent CTABLE files. I haven't looked into the impact of this, but my immediate thought is that it is straight forward.

from proj.

sebastic avatar sebastic commented on August 27, 2024

I think the code for ctable format files can stay to keep support for old grid files.

This issue can be closed in my opinion too. The ctable2 format is used since proj-datumgrid-1.6RC1.

from proj.

kbevers avatar kbevers commented on August 27, 2024

I think the code for ctable format files can stay to keep support for old grid files.

Usage of the old files will go towards zero, so at some point in the future we will have code that is never used. I don't like that. In my view the less lines of code to maintain the better. Exactly when the right time to remove the CTable code is up for debate. In general the grid reading code could use a big overhaul, so when someone gets round to do that they can also remove the CTable stuff. I am planning on creating a bunch of issues for stuff to do in 6.0.0 and 7.0.0. I will keep this in mind when I do that.

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.