-
Notifications
You must be signed in to change notification settings - Fork 2
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
read/write locations.geojson and rework spec implementation #37
Conversation
read_files now needs file extension
add file_ext to specs
revert to original implementation
Since there have been quite some changes and expansions with GTFS in the past few years – and it looks like there are still some underway – we reached to a limit with hard coding the specifications in
So now this PR has expanded quite a bit and there are a alot of changes under the hood. There should be no changes in interfacing with gtfsio however (except if you use I'll try to adapt tidytransit to this state to see if there's any issues popping up there. I'm not sure how straightforward converting a json list to an sf object actually is. |
Do you see any issues with this @dhersz @rafapereirabr @mpadge? |
Co-authored-by: mark padgham <mark.padgham@email.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for putting in the great work here @polettif !!
100% coverage except deprecated get_gtfs_standards
@rafapereirabr Do you have any objections to merging this PR? |
This all looks good to me, @polettif ! I think you're good to go and merge the PR. I would be glad to merge the PR, but I'm currently not listed as co-author of the package so I'm not sure I have the 'proper authority' to do so . |
As discussed in #36, with this PR
import_gtfs()
can read feeds containinglocations.geojson
files. Changes:read_files()
now reads a file as json if it ends with ".geojson"jsonlite
forread_json()
file_ext
for each file to gtfs_standardThere are no interface changes except for a slightly changed error message.
Geojson files are not validated further (except maybe what happens within read_json). It's a rather minimalistic approach to solve the issue. I hope I used the right patterns and syntax, I got a bit confused with the handling of file variables with extensions and those without, I'm not sure it's always clear what's expected.