GithubHelp home page GithubHelp logo

"No inverse method available" about proj HOT 7 CLOSED

dvargas74 avatar dvargas74 commented on August 27, 2024
"No inverse method available"

from proj.

Comments (7)

dvargas74 avatar dvargas74 commented on August 27, 2024

I get an test error when running "gie" program with "gridshift.gie" file for the operation:

"operation +proj=gridshift +grids=tests/test_gridshift_projected.tif"

gridshift: Invalid latitude

I'm using PROJ v9.4.0

from proj.

rouault avatar rouault commented on August 27, 2024

I get an test error when running "gie" program with "gridshift.gie" file for the operation:

I suspect some misconfiguration in your system. Are you sure you aren't mixing PROJ versions?

from proj.

dvargas74 avatar dvargas74 commented on August 27, 2024

This is the header obtained when running "projinfo" and "proj" programs:

Rel. 9.4.0, March 1st, 2024

All tests are succeeded except the one for this operation

On the other hand, here a piece of code for debugging this issue:

PJ_COORD source = proj_coord(-598000.000, -1160020.000, 0.000, 0);
PJ_CONTEXT* context = proj_context_create();
PJ *pj = proj_create(context, "+proj=gridshift +grids=test_gridshift_projected.tif");
double x = proj_roundtrip(pj, PJ_DIRECTION::PJ_FWD, 1, &source);

Should be right? What about the pipeline at the beginning of this conversation?

from proj.

rouault avatar rouault commented on August 27, 2024

Should be right? What about the pipeline at the beginning of this conversation?

both looks OK

from proj.

dvargas74 avatar dvargas74 commented on August 27, 2024

Then, what could be the problem?
This is very important for us. Any idea about what I can do?
Does the code above work fine on your end?

from proj.

rouault avatar rouault commented on August 27, 2024

Does the code above work fine on your end?

yes, it does (and the related tests runs fine on the continuation integration on all major platforms):

I've just successfully tested the following:

$ cat test.cpp
#include <stdio.h>
#include <proj.h>

int main() {
    PJ_COORD source = proj_coord(-598000.000, -1160020.000, 0.000, 0);
    PJ_CONTEXT* context = proj_context_create();
    PJ *pj = proj_create(context, "+proj=gridshift +grids=test_gridshift_projected.tif");
    PJ_COORD res = proj_trans(pj, PJ_FWD, source);
    printf("%f %f\n", res.xy.x, res.xy.y);
    PJ_COORD res2 = proj_trans(pj, PJ_INV, res);
    printf("%f %f\n", res2.xy.x, res2.xy.y);

    return 0;
}

$ g++ -I../src test.cpp -o mytest -Llib -lproj && LD_LIBRARY_PATH=$PWD/lib PROJ_DATA=data/for_tests/tests:data PROJ_DEBUG=ON ./mytest 
pj_open_lib(proj.ini): call fopen(data/proj.ini) - succeeded
pj_open_lib(proj.db): call fopen(data/proj.db) - succeeded
pj_open_lib(test_gridshift_projected.tif): call fopen(data/for_tests/tests/test_gridshift_projected.tif) - succeeded
-5597999.884995 -6160019.977850
-598000.000000 -1160020.000000

Then, what could be the problem?

I don't know. I'm pretty bad at diagnosing issues I can't reproduce locally. Maybe compare the log messages you get by setting PROJ_DEBUG=ON with the ones above. Otherwise I have nothing better to suggest than running through a debugger and stepping ...

from proj.

dvargas74 avatar dvargas74 commented on August 27, 2024

Thank you so much for your help. I'll check, again, everything on my end.

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.