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

Issues with spaces in a file, this fixes it #17

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

mauro3
Copy link
Contributor

@mauro3 mauro3 commented Jun 5, 2024

I tried to read the ascii-grid in https://data.geo.admin.ch/ch.swisstopo.digitales-hoehenmodell_25/data.zip and it didn't work because:

  • data part has no spaces at the beginning of the line
  • data part has spaces at the end of the line
  • header are in ALL-CAPS

This PR fixes this. Also simplified the reader a bit.

PS: I implemented some ascii reader some time ago too, also for the binary files. In case you're interested: https://github.com/eth-vaw-glaciology/GlacioTools.jl/blob/50c96b10399783b9b23e56455730db2be3a41ba2/src/misc-file-readers.jl#L131

mauro3 added 2 commits June 5, 2024 20:09
…rting with space.

Also now allows spaces at the end of the line.
Improved reader code a bit.
Copy link
Member

@rafaqz rafaqz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jguerber jguerber merged commit a13adc4 into JuliaGeo:master Jun 6, 2024
4 checks passed
@mauro3
Copy link
Contributor Author

mauro3 commented Jun 6, 2024

Cool, that was fast, thanks! Would you mind tagging a release (I guess it should be a patch), I'd like to use this in a workshop which I give next Monday.

@jguerber
Copy link
Collaborator

jguerber commented Jun 6, 2024

Thank you for the PR in the first place ! Ok, i'm on it :)

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

Successfully merging this pull request may close these issues.

3 participants