Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elevation not extracted #20

Closed
nystromb opened this issue Nov 13, 2022 · 4 comments
Closed

elevation not extracted #20

nystromb opened this issue Nov 13, 2022 · 4 comments

Comments

@nystromb
Copy link

nystromb commented Nov 13, 2022

  • gpx_converter version: 2.0.0
  • Python version: 3.9.13
  • Operating System: Mac OS Monterey 12.5

Description

I created a virtualmachine for my project and installed gpx-converter to convert gpx file to json. I tested it out on a gpx file I have and saw that the elevation is not being extracted. Here is a sample trackpoint, my usage, and my output.

Sample GPX

<trkseg>
      <trkpt lat="45.757796665" lon="-87.087254604">
        <ele>0</ele>
        <time>1970-01-01T00:00:00Z</time>
      </trkpt>
      <trkpt lat="45.757796665" lon="-87.087254604">
        <ele>0</ele>
        <time>1970-01-01T00:00:00Z</time>
      </trkpt>
      <trkpt lat="45.757796665" lon="-87.087254604">
        <ele>0</ele>
        <time>1970-01-01T00:00:00Z</time>
      </trkpt>
      <trkpt lat="45.757561031" lon="-87.087239819">
        <ele>0</ele>
        <time>1970-01-01T00:00:00Z</time>
      </trkpt>
      <trkpt lat="45.757561031" lon="-87.087239819">
        <ele>0</ele>
        <time>1970-01-01T00:00:00Z</time>
      </trkpt>
      ....
</trkseg>

Usage

(env) ➜ pip install gpx-converter
(env) ➜ gpx_converter -func "gpx_to_json" -in "test/ag.gpx" -out "out.json" 
conversion from gpx_to_json was done successfully
(env) ➜  cat out.json
// summarized output since its long
{
  "time": [],
  "latitude": [],
  "longitude": []
  // no elevation key
} 

I expected to see the elevation key with the data associated, but I did not. I also tried to set the key manually via args programmatically but that did not do it. Am I doing something wrong?

@sirdrakeistda
Copy link
Collaborator

I think my pr is not yet in the pip version. If you want to export all gps data to dict, you should have a look on this pr:
#16
@nidhaloff it would be nice, if the pip version could be updated.

@nystromb
Copy link
Author

nystromb commented Feb 7, 2023

Thanks @sirdrakeistda for that change! I did see your PR and so that's why I was a little confused on why it was not extracted, since it was merged almost a year ago :)

@nidhaloff
Copy link
Owner

@sirdrakeistda @nystromb sorry for the late reply. Apparently there was an issue with my pypi account. I just resolved it and published the new release

@sirdrakeistda
Copy link
Collaborator

My local version (the version including my pr) and the pip version behave differently. I'm not really experienced with github, but I do not see my changes in the file (especially these: ee3c5f8 26b3940) where I would expect my changes: https://github.com/nidhaloff/gpx-converter/blob/master/gpx_converter/base.py
@nidhaloff Is there a reason why this change is not included? It is much more powerfull and flexible then the old implementation and exports much more data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants