arsf / lag

LiDAR Analysis GUI
GNU General Public License v2.0
22 stars 5 forks source link

LAZ Support #14

Open arsf opened 11 years ago

arsf commented 11 years ago

Ensure LAG is capable of supporting the LAZ file format. The laslib library supports various, but transparent, improvements, which take effect when using LAZ files. For example, Martin Isenburg suggests using the laslib provided clipping tests in LoadWorker.cpp at approx line 304, replacing

if (usearea)
{
    if (!vectorTest(fence.getXs(), fence.getYs(), 4,
        reader->point.get_x(), reader->point.get_y()))
    {
        skip_counter = 0;
        continue;
    }
}

with something like

reader->inside_rectangle(fence.getXs()[0], fence.getYs()[0], fence.getXs()[1], fence.getYs()[1]);
ada-foss commented 11 years ago

Mateusz Loskot also suggests storing the values of fence.getXs and getYs to avoid unnecessary calls.

ada-foss commented 11 years ago

Support for laz added to the latest testing branch, so lag will now load laz files if given them. However, no improvements are presently in place, and furthermore, it seems that LAG is deciding what files to accept or reject based on filenames, which is not good practice.

Ideally, LAG should interrogate laslib on whether it can load any given file and act appropriately. This would transfer the matter of file support upstream into laslib.