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

gol query outputs invalid csv #108

Closed
nlehuby opened this issue Jan 12, 2024 · 2 comments
Closed

gol query outputs invalid csv #108

nlehuby opened this issue Jan 12, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nlehuby
Copy link

nlehuby commented Jan 12, 2024

The gol query command outputs invalid csv when the requested tags are not set on some OSM objets

For instance :
gol query idf 'n[railway=subway_entrance]' -f=csv -t=name,ref,lat,lon > entrances.csv

outputs

t,id,name,ref,lat,lon
N,7924971323,"Les Agnettes",48.9230355,2.2859444
N,1519417728,"La Plaine Stade de France",1,48.929194,2.3568467
N,8224750689,"Rue Danièle Casanova",2,48.9299347,2.3565682
N,8224750688,"Rue Danièle Casanova",2,48.9299633,2.3565688
(...)

The fist line has 5 columns while the other ones have 6, because the first OSM object does not have the wanted ref tag

(tested with 0.1.8 version)

@clarisma clarisma added the bug Something isn't working label Jan 12, 2024
@clarisma
Copy link
Owner

Thanks for submitting this!
CsvFeaturePrinter should output an empty value if the feature does not have a specified tag, in order to maintain the column structure.
A fix is coming shortly.

@clarisma clarisma self-assigned this Jan 12, 2024
clarisma added a commit that referenced this issue Jan 13, 2024
@clarisma
Copy link
Owner

Fix is in dev, will be released as part of v0.1.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants