nidhaloff / gpx-converter

python package for manipulating gpx files and easily converting gpx to other different formats
https://gpx-converter.readthedocs.io/en/latest/
MIT License
67 stars 18 forks source link

Added time and altitude options to to_gpx functions #11

Closed Eeelco closed 2 years ago

Eeelco commented 2 years ago

This should fix #5. I set the default values of the new columns to None in order to not break existing workflows.

nidhaloff commented 2 years ago

@Eeelco Looks good, thanks for the PR. Can you consider adding some unit tests under the tests folder? this has been already described in the contribution guide.

Eeelco commented 2 years ago

@nidhaloff Thanks for the feedback. I implemented the tests as you suggested. I also implemented a test for the gpx_to_excel function, which showed that this function had problems when the input contained timezone data. This should now be fixed.

The pd.Timestamp function seemed to have a problem with the timeformat for .json files being in the epoch format. Converting a json to gpx and back again would result in the last 6 digits of the timestamp being cut-off somehow. Due to this, I changed the gpx_to_json function to also export time in the ISO format, which has the added benefit of the different formats being more uniform.

nidhaloff commented 2 years ago

@Eeelco Good finding! Thanks for your work ;)

Eeelco commented 2 years ago

@nidhaloff No problem, thanks for your help! Would you mind labelling the contribution as hacktoberfest-accepted?

nidhaloff commented 2 years ago

@Eeelco Done