Wrong elevation info from GPS file using viewfinderpanorama's DEMs

Issue #122 resolved
febs created an issue

I loaded this GPX track into QMapShack 1.6.0:

GPX track

I added and activated the DEM files from viewfinderpanorama.org and "wrapped" them in a vrt file. The DEM files are loaded and the hillshade is generated just fine.

Still, if I click the track, an info message appears showing a total uphill of more than 4000mt for the track, which is not the case (I am sure of that).

I am wondering if the matter is only aesthetics and if it's showing the elevation in feet rather than meters or if it's just a coincidence.

Hope this helps somewhat.2016-03-16-134443_1391x688_escrotum.png

Comments (17)

  1. Christian Eichler

    All calculation of what we call "derived data" is done using the data supplied by the track (that is in your case: read from the .gpx file).

    Thus - if you really want to use data from DEM - you need to replace the elevation data using the filter "Replace Elevation Data" (Rightclick Track > Edit... > Tab "Filter" > Group "Change elevation of track points").

  2. febs reporter

    Well, actually, I just tried and the app crashed. There is the only log line I got (there are more but several minutes older)

    [1] 26290 segmentation fault (core dumped) /home/fabio/Downloads/build_QMapShack/bin/qmapshack

  3. febs reporter
    • changed status to open

    qmapshack crashed when trying to do so. After right clicking the track name -> edit, the app crashes after 1-2 seconds before I can do anything else.

    I tried to reproduce it and it happened again.

  4. Christian Eichler

    Can you provide the dings you did (as precisely as possible) / can you reproduce this segfault? Are you using QMS 1.6.0 (released version) or QMS 1.6.0.post (from repo)?

    Do you have any backtrace for me? (A core was dumped, so you could use gdb to provide a backtrace)

  5. Christian Eichler

    Just to be sure: You can reproduce this by simply selecting the "Edit..." in the context menu and waiting for 1-2 seconds? (-> You did not do any filtering?)

    More precisely: Did you move the mouse somewhere onto the plots?

  6. Christian Eichler

    I had an issue simmilar to your problem - caused by changes done after releasing 1.6.0, that caused failing initialization of PROJ.4 (...we currently don't check that, I think we should implement that asap).

    Is the environment variable PROJ_LIB set on your system?
    Make sure it is either valid or unset (unset != set to "").

  7. kiozen

    As you do have a debug version have a look at

    void CPlotTrack::setMouseFocus(qreal lon, qreal lat)
    {
        pos.rx() = lon * DEG_TO_RAD;
        pos.ry() = lat * DEG_TO_RAD;
    
        pj_transform(pjtar, pjsrc, 1, 0, &pos.rx(), &pos.ry(), 0);
    
        update();
    }
    

    Probably pjsrc is 0. pjsrc is set in

    void ITrack::setupProjection(const QRectF& boundingBox)
    {
        if(pjsrc)
        {
            pj_free(pjsrc);
            pjsrc = nullptr;
        }
    
        if(boundingBox.top() > (60*DEG_TO_RAD))
        {
            pjsrc = pj_init_plus("+init=epsg:32661");
        }
        else if(boundingBox.bottom() < (-60*DEG_TO_RAD))
        {
            pjsrc = pj_init_plus("+init=epsg:32761");
        }
        else
        {
            pjsrc = pj_init_plus("+init=epsg:3857");
        }
    }
    

    The EPSG projections only work if proj4 is installed properly. You can also test for proper installation if you follow the example given in the man page of proj

    man proj
    
  8. febs reporter

    There's no PROJ_LIB environment variable set in my shell. I am afraid I did not get how to follow kiozen's tip.

    Thank you

  9. kiozen

    What happens if you enter in a console:

    proj  +init=epsg:32761 -r
    

    and then

    48 12
    

    The expected output is:

    8810722.41      34041929.72
    

    If it is, proj4 seems to be installed correctly. If not, it's a bad proj4 installation

  10. febs reporter

    so it looks liks it's a bad proj4 installation, since I get:

    Rel. 4.8.0, 6 March 2012
    <proj>:
    projection initialization failure
    cause: no system list, errno: 2
    
    program abnormally terminated
    

    I'll try to fix that, thanks.

    It'd had been quite impossible to get there without help.

    I'll follow up with any news. Thanks.

  11. kiozen

    Imho you should analyze why your packages aren't installed properly. It has been Routino, now it's Proj4, probably GDAL will be next. Proper installation of dependencies is crucial to get software running flawlessly.

    Is there anything broken with your package management? Or do you compile all that stuff on your own? And if, do you always uninstall binary packages first? Do you follow the instructions by the line? Do you read the output and look for for warnings and unexpected output?

    As CentOS is RedHat based there should be quite recent, ready-to-use binaries. If you are not familiar with the caveats of compiling and installing software you should stick to those binaries. It's less frustrating.

  12. febs reporter

    Both routino and gdal were installed via the native package system of Centos 7 (that is, "yum").

    Uninstalling routino via yum and installing it via source solved that issue.

    And now, uninstalling proj from the package system and building it from source, solved this as well. I was just able to go further that process without any incident.

    Probably is needless to say, but I think QMapShack should suggest to upgrade routino if needed - the default message is not very informative about that - or, the configuration process should just fail if there's not an adequate version installed.
    And, it shouldn't crash in case of a proj issue but somewhat report about it? Sorry if this is trivial to write.

    It is also needless to say that Centos really sucks as a desktop OS.

    Thanks for your help. Searching for img maps now.

  13. febs reporter

    Holy crap, there's one more issue - this is more related to the original subject of this one.

    I can't select any group in the "filter" tab, as pictured. Those are all greyed out and unselectable:

    2016-03-17-145426_932x729_escrotum.png

    EDIT: I had to "unlock" that by clicking on the lock icon. Issue solved.

  14. Log in to comment