It refactors mats2line() by utilizing vec_interleave() and sfheaders::sfc_linestring(). It adds an explicit dependency on vctrs (minimum version 0.4.0 as that is when vec_interleave() was added).
Note that vctrs is implicitly imported at present, this just makes it explicit.
An additional test is added to verify the validity of the linestrings that are created by mats2line().
Checks are additionally added to verify that mat1 and mat2 are of compatible sizes.
This PR closes #539.
It refactors
mats2line()
by utilizingvec_interleave()
andsfheaders::sfc_linestring()
. It adds an explicit dependency on vctrs (minimum version 0.4.0 as that is when vec_interleave() was added).An additional test is added to verify the validity of the linestrings that are created by
mats2line()
. Checks are additionally added to verify thatmat1
andmat2
are of compatible sizes.