pctrain throws Error: invalid string position when the input filename stem (without extension) is shorter than 3 characters. Renaming the file to a stem of 3 or more characters resolves the issue without any other changes to the data.
PS D:\LAS\repariert> copy .\0.laz .\a.laz
PS D:\LAS\repariert> pctrain .\a.laz
Using Random Forest
Processing .\a.laz
Reading points from .\a.laz
Number of points: 89799
Label dimension: Classification
Error: invalid string position
PS D:\LAS\repariert> copy .\0.laz aa.laz
PS D:\LAS\repariert> pctrain aa.laz
Using Random Forest
Processing aa.laz
Reading points from aa.laz
Number of points: 89799
Label dimension: Classification
Error: invalid string position
PS D:\LAS\repariert> copy .\0.laz aaa.laz
PS D:\LAS\repariert> pctrain .\aaa.laz
Using Random Forest
Processing .\aaa.laz
Reading points from .\aaa.laz
Number of points: 89799
Label dimension: Classification
Warning: point cloud does not have colors, will set color to white
Starting resolution: 0.13
Init scale 0 at 0.13 ...
Init scale 1 at 0.13 ...
Init scale 3 at 0.52 ...
Init scale 4 at 1.04 ...
Init scale 5 at 2.08 ...
Init scale 2 at 0.26 ...
Building scale 1 (81890 points) ...
Building scale 2 (68268 points) ...
Building scale 3 (45945 points) ...
Building scale 4 (13216 points) ...
Building scale 5 (2980 points) ...
Features: 105
Samples per label: 15686
* unclassified: 0 / 0
* ground: 15686 / 66204
* low_vegetation: 0 / 0
* medium_vegetation: 0 / 0
* high_vegetation: 15686 / 15686
* building: 0 / 0
* low_point: 0 / 0
* water: 0 / 0
* rail: 0 / 0
* road_surface: 0 / 0
* wire_guard: 0 / 0
* wire_conductor: 0 / 0
* transmission_tower: 0 / 0
* wire_structure_connector: 0 / 0
*
Expected behavior: pctrain should process the file regardless of filename length.
Environment: OS: Windows 10, powershell, Input format: LAZ
pctrain throws Error: invalid string position when the input filename stem (without extension) is shorter than 3 characters. Renaming the file to a stem of 3 or more characters resolves the issue without any other changes to the data.
Expected behavior: pctrain should process the file regardless of filename length.
Environment: OS: Windows 10, powershell, Input format: LAZ