Handle duplicate headers and changing number of data columns. #71
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.
Description:
Handle duplicate headers and changing number of data columns.
This pull-request enables parsing some of the LAS files in issue:
more malformed LAS files from USGS to handle, mostly florida
more malformed LAS files from USGS to handle, mostly florida #61Changes to dist/index.js:
Ignore additional entries for the unique header.
These are the headers: ~V, ~W, ~C, ~P, ~O, and ~A.
section data to sub-function: las2json.readSections()
main logic more prominent.
columns in the data rows. If a row has more data columns than the
headings, then add generic colunms titled 'UNKNOWN' + a number. Then
populate the previous rows for that column with zero string values '0'
Add tests:
This is a fairly big change, with moving some code sections around and replacing some code with a sub-function.
Test Results:
--
Let me know if this change could be accepted (or rejected) or
needs some additional changes to be approved and merged.
Thank you,
DC