Additional extension fields and option to extract CSV - #8
Open
yushiyangk wants to merge 17 commits into
Open
Conversation
Avoid a second pass for copying out the gpx data into separate lists. Using a single pass also potentially gives better spatial locality (though probably negligible in Python).
A warning will be raised if there is missing GPS data when `require_gps` is not explicitly set to False. `save_gpx` will raise warnings if data was extracted with `require_gps` set to False, and also when there are missing GPS data points. `resample` will similarly raise warnings, and non-GPS data points will be discarded, unless resampling method is set to 'none'.
yushiyangk
force-pushed
the
extensions-csv
branch
from
July 7, 2026 02:49
a4ac24e to
93f3e7b
Compare
yushiyangk
force-pushed
the
extensions-csv
branch
from
July 7, 2026 02:51
93f3e7b to
cb5152a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, thanks for this very useful project. I have implemented some additional features for my own use, that I hope you would consider incorporating upstream.
Summary of changes:
gps_dataextract_extensionsto the CLI with a new option--additionalrequire_gps=True, which when set to False allows points to be extracted even when GPS data is missingOsmoGps.save_csv()and CLI commandextract-csvin addition to gpxDo let me know if you have any thoughts, thank you!
Backwards compatibility
There should be no breaking changes.
The added parameters (
require_gps) and added CLI options default to their previous behaviour.Details
For (3),
save_gpx()andresample()both will raise warnings ifrequire_gpswas set to False (defaults to True). When True, any data points that do not have GPS information will raise a warning, similar to prior behaviour.Also,
resample()will automatically discard any data points without GPS information ifresampling_methodis notnone, because it's not clear to me how such data points should be treated otherwise.For (4), I moved some of the duplicated logic between
save_gpxandsave_csvinto their own functions. Output formatting is now done in_render_point(). I also mademain.py:extract()takesave_methodas an argument.