[GRASS-dev] Announcing libLAS

Hi,

My name is Mateusz Loskot (Poland). I'm writing first time to this list,
so I'd like to say hello to all!

I'd like to ask if there would be a potential interest and application
for libLAS library (http://liblas.org) in GRASS. The library provides
implementation of the ASPRS LAS format specification as well as a set of
command line utilities to manipulate LAS files.

I don't know what's the exact LIDAR toolset available in GRASS but
perhaps there is no LAS support and libLAS could come handy here.

Looking foward to hear your comments.
--
Mateusz Loskot
http://mateusz.loskot.net

High Mateus,

we would love to see at least a direct input of LAS data into GRASS using the libLAS library!
Other tools would be welcome too.

There is a growing number of GRASS users who work with lidar data (I have been using lidar data with GRASS for my research for over 7 years now, even before LAS was established).
Many general GRASS modules are great for lidar data processing and analysis and there is also a set of specialized tools. But if the data come in LAS format we need to use external tools (e.g. LAStools - I see that libLAS is based on it) to convert to ascii and import (using v.in.ascii or r.in.xyz). Having a module that reads LAS data directly would be a great help.

I was just invited to USGS workshop to show some applications of lidar data done with open source software tools and I am sure that the first question I will get is whether GRASS can read LAS data - it would be great if I could say yes.

But this will raise a question for GRASS dev whether we want to add another dependency to GRASS in addition to GDAL and PROJ and a number of optional ones?

Thanks for asking and I hope we will see LAS support in GRASS soon (I have plenty of data to test it),

Helena

----------------------
Helena Mitasova
Associate Professor
Department of Marine, Earth
and Atmospheric Sciences
1125 Jordan Hall, Campus Box 8208
North Carolina State University
Raleigh NC 27695-8208
http://skagit.meas.ncsu.edu/~helena/

On May 3, 2008, at 3:22 PM, Mateusz Loskot wrote:

Hi,

My name is Mateusz Loskot (Poland). I'm writing first time to this list,
so I'd like to say hello to all!

I'd like to ask if there would be a potential interest and application
for libLAS library (http://liblas.org) in GRASS. The library provides
implementation of the ASPRS LAS format specification as well as a set of
command line utilities to manipulate LAS files.

I don't know what's the exact LIDAR toolset available in GRASS but
perhaps there is no LAS support and libLAS could come handy here.

Looking foward to hear your comments.
--
Mateusz Loskot
http://mateusz.loskot.net
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Helena Mitasova wrote:

High Mateus,

we would love to see at least a direct input of LAS data into GRASS using the libLAS library! Other tools would be welcome too.

Helena,

That's great!

Many general GRASS modules are great for lidar data processing and analysis and there is also a set of specialized tools. But if the data come in LAS format we need to use external tools (e.g. LAStools - I see that libLAS is based on it) to convert to ascii and import (using v.in.ascii or r.in.xyz). Having a module that reads LAS data directly would be a great help.

Yes, it confirms what I've read in GRASS docs and Wiki pages,
that there is no direct support to ASPRS LAS format.

I was just invited to USGS workshop to show some applications of lidar data done with open source software tools and I am sure that the first question I will get is whether GRASS can read LAS data - it would be great if I could say yes.

I'm willing to contribute a module for LAS read/write. However, I'm not an experienced GRASS user nor developer, so I'll likely need to prepare myself a little (read docs and code) before I can start. Means, I'm not sure I can provide you with ready solution very soon.

But this will raise a question for GRASS dev whether we want to add another dependency to GRASS in addition to GDAL and PROJ and a number of optional ones?

Right, that seems to be basic question.

If it will help to make a decision:
The libLAS building follows well-known *nix patterns and there is autotools-based builder. Optionally, users are provided with cmake configuration as well as project files for Visual C++ 2005.
The library itself has no external dependencies.

Thanks for asking and I hope we will see LAS support in GRASS soon (I have plenty of data to test it),

I'd be happy if I could help.

--
Mateusz Loskot
http://mateusz.loskot.net

On Saturday 03 May 2008 03:14:50 pm Mateusz Loskot wrote:

Helena Mitasova wrote:
> High Mateus,
>
> we would love to see at least a direct input of LAS data into GRASS
> using the libLAS library! Other tools would be welcome too.

Helena,

That's great!

> Many general GRASS modules are great for lidar data processing and
> analysis and there is also a set of specialized tools. But if the data
> come in LAS format we need to use external tools (e.g. LAStools - I see
> that libLAS is based on it) to convert to ascii and import (using
> v.in.ascii or r.in.xyz). Having a module that reads LAS data directly
> would be a great help.

Yes, it confirms what I've read in GRASS docs and Wiki pages,
that there is no direct support to ASPRS LAS format.

> I was just invited to USGS workshop to show some applications of lidar
> data done with open source software tools and I am sure that the first
> question I will get is whether GRASS can read LAS data - it would be
> great if I could say yes.

I'm willing to contribute a module for LAS read/write. However, I'm not
an experienced GRASS user nor developer, so I'll likely need to prepare
myself a little (read docs and code) before I can start. Means, I'm not
sure I can provide you with ready solution very soon.

> But this will raise a question for GRASS dev whether we want to add
> another dependency to GRASS in addition to GDAL and PROJ and a number of
> optional ones?

Right, that seems to be basic question.

If it will help to make a decision:
The libLAS building follows well-known *nix patterns and there is
autotools-based builder. Optionally, users are provided with cmake
configuration as well as project files for Visual C++ 2005.
The library itself has no external dependencies.

> Thanks for asking and I hope we will see LAS support in GRASS soon (I
> have plenty of data to test it),

I'd be happy if I could help.

While I do not have any lidar data on hand, there are several researchers at
UCD who both use GRASS and work with lidar. I am very interested in any
integration of libLAS into a GRASS module, and I will pass the word around
here. Great work Mateusz!

Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341

Dylan Beaudette wrote:

On Saturday 03 May 2008 03:14:50 pm Mateusz Loskot wrote:

Helena Mitasova wrote:

Thanks for asking and I hope we will see LAS support in GRASS soon (I
have plenty of data to test it),

I'd be happy if I could help.

I am very interested in any integration of libLAS into a GRASS module, and I will pass the word around here.

Dylan,

Great!

Great work Mateusz!

Thank you very much on behalf of the libLAS Team!

Greetings
--
Mateusz Loskot
http://mateusz.loskot.net

Mateusz:

Yes, it confirms what I've read in GRASS docs and Wiki pages,
that there is no direct support to ASPRS LAS format.

...

I'm willing to contribute a module for LAS read/write. However, I'm not
an experienced GRASS user nor developer, so I'll likely need to prepare
myself a little (read docs and code) before I can start. Means, I'm not
sure I can provide you with ready solution very soon.

...

The libLAS building follows well-known *nix patterns and there is
autotools-based builder. Optionally, users are provided with cmake
configuration as well as project files for Visual C++ 2005.
The library itself has no external dependencies.

Hi,

I don't claim to know anything about what libLAS does, so sorry if this
doesn't make sense. But if it is purely vector format I/O would it be
better to write it as a new format for GDAL's OGR and have grass access
it with v.in.ogr? Then other FOSS softwares could easily gain advantage
of it too.

http://liblas.org/wiki/LASElements

Or is the dataset size/model such that it is better to directly
import/process it in GRASS using fast C modules as a front end to the
lib?

or simply DAS export to a text file:
DAS -> x|y|z|extra1|extra2|extra3|... + header metadata | r.in.xyz ?

Helena:

> But this will raise a question for GRASS dev whether we want to add
> another dependency to GRASS in addition to GDAL and PROJ and a number
> of optional ones?

I see no problem adding new optional depenencies, if they are useful,
added into the build system properly, switched off by default, and
license compatible.

Hamish

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Hamish wrote:

Mateusz:

Yes, it confirms what I've read in GRASS docs and Wiki pages,
that there is no direct support to ASPRS LAS format.

...

I'm willing to contribute a module for LAS read/write. However, I'm not
an experienced GRASS user nor developer, so I'll likely need to prepare
myself a little (read docs and code) before I can start. Means, I'm not
sure I can provide you with ready solution very soon.

...

The libLAS building follows well-known *nix patterns and there is autotools-based builder. Optionally, users are provided with cmake configuration as well as project files for Visual C++ 2005.
The library itself has no external dependencies.

Hi,

I don't claim to know anything about what libLAS does, so sorry if this
doesn't make sense. But if it is purely vector format I/O would it be
better to write it as a new format for GDAL's OGR and have grass access
it with v.in.ogr?

Hamish,

I agree that the LAS format is a vector format by data nature and structure. However, considering how LiDAR clouds are usually processed and analysed, they are closer to rasters and grids:
1. It's not uncommon to store millions of points in a single LAS file.
2. Mostly we are not interested in a single point feature but in groups/areas of hundreds or thousands
3. A feature-oriented seems not very usable

Technically, there is no problem with translating LAS file to OGR datasource and there is a prototype of appropriate tool [1] available,
but I'm not optimistic in its usability and *performance* in processing
of large sets of LiDAR data.

[1] http://liblas.org/svn/trunk/apps/las2ogr.cpp

Or is the dataset size/model such that it is better to directly
import/process it in GRASS using fast C modules as a front end to the
lib?

Yes, this is my understanding. As a note of explanation, I'm not a very experienced user of LiDAR data, so I'm not able to explain the nature of processing and analysis of "huge clouds of points" datasets.
However, I understand that speed and performance is a critical factor.

Greetings
--
Mateusz Loskot
http://mateusz.loskot.net

On May 5, 2008, at 10:37 AM, Mateusz Loskot wrote:

Hamish wrote:

Mateusz:

Yes, it confirms what I've read in GRASS docs and Wiki pages,
that there is no direct support to ASPRS LAS format.

...

I'm willing to contribute a module for LAS read/write. However, I'm not
an experienced GRASS user nor developer, so I'll likely need to prepare
myself a little (read docs and code) before I can start. Means, I'm not
sure I can provide you with ready solution very soon.

...

The libLAS building follows well-known *nix patterns and there is autotools-based builder. Optionally, users are provided with cmake configuration as well as project files for Visual C++ 2005.
The library itself has no external dependencies.

Hi,
I don't claim to know anything about what libLAS does, so sorry if this
doesn't make sense. But if it is purely vector format I/O would it be
better to write it as a new format for GDAL's OGR and have grass access
it with v.in.ogr?

Hamish,

I agree that the LAS format is a vector format by data nature and structure. However, considering how LiDAR clouds are usually processed and analysed, they are closer to rasters and grids:
1. It's not uncommon to store millions of points in a single LAS file.
2. Mostly we are not interested in a single point feature but in groups/areas of hundreds or thousands
3. A feature-oriented seems not very usable

Technically, there is no problem with translating LAS file to OGR datasource and there is a prototype of appropriate tool [1] available,
but I'm not optimistic in its usability and *performance* in processing
of large sets of LiDAR data.

[1] http://liblas.org/svn/trunk/apps/las2ogr.cpp

Or is the dataset size/model such that it is better to directly
import/process it in GRASS using fast C modules as a front end to the
lib?

Yes, this is my understanding. As a note of explanation, I'm not a very experienced user of LiDAR data, so I'm not able to explain the nature of processing and analysis of "huge clouds of points" datasets.
However, I understand that speed and performance is a critical factor.

Hamish - what Mateusz is saying is right - in fact the first thing I had in mind was to ask both of you to see how to make r.in.xyz read the LAS data directly (and maybe even run several of the statistics at once, if possible). The data sets usually have millions of points (you may remember the email about my colleague running r.in.xyz with 1.5 billion points) so skipping the ascii conversion may help quite a bit.

However, there are applications when it is useful to import the data as vector points (at least some smaller data sets or subsets). From the point of view of code maintenance doing it through v.in.ogr would be the best, if that proves too inefficient, a new module v.in.las is another option. With any import as vector points we would have to deal with the issue of skipping the topology and thus having only few modules work with the data - but this goes beyond the libLAS.

I just got a new data set for Jockey's ridge acquired by the state-of-the-art lidar in 2007 with data in all kinds of formats including LAS. I posted one tile LAS and filtered points txt file here:

http://skagit.meas.ncsu.edu/~helena/grasswork/grassbookdat/
JR_442*.txt.gz
c_JR_442*.las.gz

There is also the old GRASS5 Location in UTM nclidar-utm.tar.gz, that should have the 1999 data in the same coordinate system (UTM) so the 2007 data can be imported there (I haven't done it yet)
(note that the 1999 points are in old sites format).
Eventually I will create a special MAPSET for nc_spm data set with time series of coastal data including JR, but this is what I have for now.

Mateusz, just FYI, this is more about the place from where the data come:
http://skagit.meas.ncsu.edu/~helena/measwork/jockeys/jockey.html

Helena

Greetings
--
Mateusz Loskot
http://mateusz.loskot.net

> Hamish wrote:
>> Mateusz:
> Hamish wrote:
>> Or is the dataset size/model such that it is better to directly
>> import/process it in GRASS using fast C modules as a front end to
>> the lib?

Mateusz:

> Yes, this is my understanding. As a note of explanation, I'm not a
> very experienced user of LiDAR data, so I'm not able to explain the
> nature of processing and analysis of "huge clouds of points"
> datasets. However, I understand that speed and performance is a
> critical factor.

Helena:

Hamish - what Mateusz is saying is right - in fact the first thing I
had in mind was to ask both of you to see how to make r.in.xyz read
the LAS data directly (and maybe even run several of the statistics
at once, if possible).

Ok, I think a new -r flag could be added to r.in.xyz to tell the input=
file to expect a LAS file instead of a text file. (I don't like -l, it is
too close to -1 in some fonts)

I really won't have any time in the few months to work on this (or much
else for that matter, no matter how interesting), but I would be
supportive of it happening.

The data sets usually have millions of points (you may remember the
email about my colleague running r.in.xyz with 1.5 billion points)
so skipping the ascii conversion may help quite a bit.

I didn't remember that but am glad to hear it (again). (thanks to those
who helped fix the LFS stuff)

However, there are applications when it is useful to import the data
as vector points (at least some smaller data sets or subsets).

if there is a LAS->ASCII.csv tool somewhere, and the LAS data is only
point data, then the job is already done for that I think. No point
introducing the overheads of SimpleFeatures etc., just go direct.

OGR

I would be happy to hand the vector/raster output question over to the
LIDAR users, as I'm not sure myself what your final output needs are.
e.g. what's the next step after import? v.surf.rst? r.univar?
thresholding?

Hamish

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

I had in mind was to ask both of you to see how to make r.in.xyz read
the LAS data directly (and maybe even run several of the statistics
at once, if possible).

support for multiple method= and output= in the same run is a
long-standing wish for r.in.xyz, see the TODO section of the help page.

before doing anything, is there a LAS -> ascii .csv output tool that
sends the data to stdout? As a first easy step that command could be
piped directly into r.in.xyz, and I expect a wrapper script around that
would run at a speed fairly close to an integrated module. With that you
could hammer out the design of what is really needed for an integrated
module.

Hamish

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Hamish wrote:

Hamish wrote:

Mateusz:

Hamish wrote:

Or is the dataset size/model such that it is better to directly
import/process it in GRASS using fast C modules as a front end
to the lib?

Mateusz:

Yes, this is my understanding. As a note of explanation, I'm not
a very experienced user of LiDAR data, so I'm not able to explain
the nature of processing and analysis of "huge clouds of points" datasets. However, I understand that speed and performance is a critical factor.

Helena:

Hamish - what Mateusz is saying is right - in fact the first thing
I had in mind was to ask both of you to see how to make r.in.xyz
read the LAS data directly (and maybe even run several of the
statistics at once, if possible).

Ok, I think a new -r flag could be added to r.in.xyz to tell the
input= file to expect a LAS file instead of a text file. (I don't
like -l, it is too close to -1 in some fonts)
[...]
I would be happy to hand the vector/raster output question over to
the LIDAR users, as I'm not sure myself what your final output needs
are. e.g. what's the next step after import? v.surf.rst? r.univar? thresholding?

Helena, Hamish,

Obviously, I'm useless in solving the issues above, so I'm going to leave the final decision about incorporating (or not) libLAS
support to the GRASS Team.

If there is a positive decision and you will like to implement libLAS module/support, I'd be happy to help or perhaps contribute in future.

Greetings
--
Mateusz Loskot
http://mateusz.loskot.net