Gitmaxwell / lastools

‘lastools’ is an R package for reading and writing version 1.2 and version 2.0 Log ASCII Standard (LAS) and for performing common functions on LAS
Other
12 stars 2 forks source link

Fix v1.2 well section field order in internal representation #7

Closed dcslagel closed 4 years ago

dcslagel commented 4 years ago

@Gitmaxwell,

This pull request, fixes a couple of v1.2 las file version tests that check the ~Well sections UWI and API values are strings.

Because many of the v1.2 well section value and description fields are reversed, this change also switches those fields for the lastools internal representation of the data. The STRT, STOP, STEP, and NULL fields are exceptions. They have their value and description fields in the regular order.

This change also adds a test case for writing the v1.2 las file with las_write.R code changes to restore the ~Well section value and description fields to the v1.2 las file standard order so that the v1.2 las file that is output meets the v1.2 standard.

This approach has been adopted from the lasio projects approach to this situation.

There is also some minor style changes changing some '=' to '<-' in some places.

Let me know if this change could be accepted (or rejected) or needs some additional changes before being approved and merged.

Thank you,

DC