From ebcefe5016509620e913e7e6d952d017b995d457 Mon Sep 17 00:00:00 2001 From: Jean-Romain Date: Tue, 1 Mar 2022 11:07:06 -0500 Subject: [PATCH] More tests --- inst/extdata/las14_prf6.laz | Bin 0 -> 46728 bytes inst/tinytest/test-readlas.R | 15 ++++++++++++++- inst/tinytest/test-readlas14.R | 27 +++++++++++++++++++++++++++ src/rlasstreamer.cpp | 2 +- 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 inst/extdata/las14_prf6.laz create mode 100644 inst/tinytest/test-readlas14.R diff --git a/inst/extdata/las14_prf6.laz b/inst/extdata/las14_prf6.laz new file mode 100644 index 0000000000000000000000000000000000000000..d387b100c2ded9b92bb964b21ff4b02b08154599 GIT binary patch literal 46728 zcmeI52V51$+VG#*Bj!sT)4xjIo zQ|_4eQcA28u_S0%$a7z8Ab&$>6MtXHRIn*;I@8CU08xHl%y6jhCc$TkY zmegm-99dGylK)d;`?6++$gmJ^L(JzVJk%8w-^h5aBz>YIehL13+9)qiQ>C7g|J*HQ zUA9%`Lp`#KkkBvh^+@L`LGgw-pXk`cg!o_G;up`8{MNE`jFnt>zx?r+K%*o7xgWE# zpCV1H3R`*R@~l^L!{MI0=JwwG<+C2^B)d;&T-e`DH2178HKn~oO0>jFf`mvE|JqA4 zF%TApKUlmZkux#U9iJxSI3FN>;x0~7OYR5)I{nI59bYe=l^|WXBEa~}Xzma~iaK+3ed813jMunw2WS4dN)_V8OV3{yj>-2g zlz^3({+UX^R0990CGh2_amHLP%@d>I4Xq->6S@S3ghm;@=vVZ9BKrB}a@(usb(;eY z9>0z7spU|I(9(vjsr2<@8Vv?4dT4$@14neg%DDl@_LoJP#0g)IpKM%TzhPUzI2ARjHP# z$WL1o@kmnS`87q}E>LB4iYh+m6sbQ@kt&T9saTowmWnuMS0w4RNaznD{cegRUBi7= z}W^VULqslFe80V{3jAcYQRpg=^?Ta1L`=`=G-0p3hn{OCdk=Tmqi@u z!fyu4u-kr$0H+t2QFnTZ^>99nezb8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{id!SE^y)h(1nY$-t&ZeM( zqn4S^8{)jtEpgT1{wr2`SKjR%GqzB@+B5dWU+vqu^2^mfoCq&7?cRr8qw+={w`#mZ zU+#5THL_HY$IX7l@>M_GG5cIyaNZNeGX|7gT~l3BKJolJeeULgW$*R33fz+xUa4!u z=8%y)#-6TS@b23a8z0Rb_poT9-=&zJw$*%*)W7J8Es5U@Novq@Cw1Wz^Vn_q&vMaY zr5P>#3ENuQ+KPG%qctZ-qRUL;9K9yu5wCLX)@OY%5M#154Tb6F$V&P%m1J?De%LF*C?@%!FuK5M`T6w13tf&1| zqksMQr0IXFi2sJ0WY`X^lQ{pSUylzDq-Ao`Z}YETk$ZTNR=p#$QUCeKctP&BCXvj2+v$ccH|Q`wNUZlOwK1 z$AX1-jhlVJrc%VJ4|}s)yscH%V}M&V$EL9!cV11i9bGHqmU}|?_r+XKY(0B!_=WWs z=li`KyLI8dYF-}#qMk0B*S-ISLva_qD<%xF9Z;`9nts&bYi$DyT4X*-Sl(xJjTQrn zHMnLKIq_J|B|BynO7Gky#%p^2It@w@v@6iO+v(iz3zV|DT+AsWeN53p(@ND_e#yQ}Gw-o`>RFTy2`oS3LAf?_rws1V z{9*Ok5xo{AZQ8%VHKSC}V3&ohf)Cs8P-7PNy^)Z7tlQpoint.get_extended_overlap_flag()); if (a && !extended) - SAR.push_back(lasreader->point.get_scan_angle()); + SAR.push_back(lasreader->point.get_scan_angle_rank()); else if (a && extended) SA.push_back(lasreader->point.get_scan_angle());