LAS, LAZ LiDAR

LAS is a format for storing LiDAR data as points.  It is a vector format, not a raster format.   LAZ format is identical to LAS except for being compressed.   This documentation uses the term LAS to mean both LAS and LAZ formats.   Manifold's LAS dataport can Import or Link from and also Export to LAS format files.

 

LiDAR technology (Light Detection and Ranging) measures terrain elevations by shining a pulsed laser from a sensing platform onto a surface and measuring reflected pulses.  Manifold imports LiDAR data from LAS format as points in a drawing, using whatever coordinate system is specified.

 

This is an experimental dataport subject to change.  Usually data is much faster when we import a file into Manifold, however, LiDAR point cloud data in LAS files is an exception.   Current Manifold builds are faster when linking a LAS file into a project, because of the specialized spatial index on points that Manifold builds for linked LiDAR files.    That special spatial index lives in an accessory .mapindexp file that is created in the same folder as the linked LAS file.   

 

Upcoming Manifold builds will include the specialized point index within .map files as well, which will mean imported LiDAR data will be even faster than linked LiDAR files.   However, for now we should link LiDAR files if we want maximum speed.   A bonus of linking LiDAR data into a project is that the Manifold project stays small, typically only one megabyte in size, since all of the LiDAR data remains stored in the LAS file.

 

Please see the Importing and Linking topic for the difference between linking a file into a Manifold project and importing data from that file into a Manifold project.

Manifold LAS Dataport Features

The Manifold LAS dataport provides the following capabilities:

 

Linking a LAS or LAZ Format File

We can link a file using either File - Link or File - Create - New Data Source.  We do not need any extra options offered by the New Data Source dialog, so we simply use the File - Link dialog.

 

 

To link a LAS or LAZ format file:

 

  1. Choose File-Link from the main menu.

  2. In the Link dialog browse to the folder containing data of interest.

  3. Ensure the Save cache box is checked (the default).

  4. Double-click the file ending in .las or .laz for the data of interest.

  5. A new data source will be created.  

  6. The first time we open the new data source, the opening process will be slow, while the index is built (a one-time job).

  7. Opening the data source thereafter will be fast.

 

Example

 

In Windows Explorer, we have a LiDAR file called pentagon.laz.  A LAZ format file is a highly compressed form of a LiDAR LAS file.

 

 

In Manifold, we choose File - Link and we navigate to the desired file.  The Save cache box is checked by default.  We leave it checked to ensure that a .mapcache file is built, to save formatting and other useful info for the next time that we want to link the file.

 

We double-click on the pentagon.laz file to link it.

 

 

A new data source, called pentagon from the stem of the .laz file, appears in the Project pane.   We click the + icon to expand the data source and to look into it.    The first time we do this, Manifold builds a .mapindexp spatial index file.  That takes time, a minute or so to build the index, during which the system will not respond and we will see a (Not Responding) note in the Project pane.  When the index is built, the data source will open and we will see the drawing and table within.

 

It takes time to build the index, but that is a one-time job that happens only the first time the .laz or .las file is linked into a Manifold project.  Once the index is built, it is saved in an accessory .mapindexp file with the .laz or .las file, and the next time any Manifold session either opens this project or links that .laz or .las file, the existing .mapindexp file will be used and the open will be instantaneous, with no need to build the index again.

 

In any event, building the index is faster than importing the LAS file.

 

We double-click drawings to open them.   For a more interesting display, we first create a new data source using a Bing street maps image server as shown in the Example: An Imageserver Tutorial topic.   We then create a map and drag and drop the Bing layer into the map, and then we drag and drop the pentagon Drawing into the map.

 

 

The drawing appears in default formatting as a mass of gray points.   It is located in the right place since LAS/LAZ format provides projection information.   

 

What we see should be regarded as a summary of the data set, a representative preview.  This particular data set contains over eight million points, but only a few thousand are shown as a representative sample.  LiDAR data sets can contain billions of points, so when they are linked and Manifold runs a spatial query to fetch data for display, the data structure automatically thins the points in the query area and returns a limited number of the best representatives.   The number of points displayed depends on the display window size. 

 

 

If we open the drawing's table, we see it is a read-only table: linked LAS data sets are read-only.  

 

 

Switching to the Layers pane, we can see the many attributes each LiDAR point has in this data set.   The reason Manifold provides a specialized, high-speed, spatial index for points in LiDAR data is to enable more efficient queries against large LiDAR data sets, with possibly billions of points.

 

 

After import, if we use Windows Explorer to look at the folder from which we linked the pentagon.laz file, we see two new files have been created, a pentagon.laz.mapcache file and a pentagon.laz.mapindexp file.  

 

The pentagon.laz.mapcache file is the standard .mapcache accessory file Manifold uses to facilitate work with linked files.  It is shown above with zero size because we have not yet saved the project.  Until we save the project, the .mapcache information is kept cached in memory.  

 

The .mapindexp file contains a specialized spatial index for points that is created when linking LAS LiDAR point cloud files into a Manifold project.  The specialized index creates a hierarchical data structure, stored as a .mapindexp file in the same folder as the LAS/LAZ file.  The .mapindexp file is then used to service spatial queries, including internal spatial queries such as those performed to display the point cloud within Manifold.  The file is versioned so that future Manifold builds can choose to reuse files created by an earlier build or overwrite them with new versions.  The .mapindexp file is only created for a linked LAS/LAZ file in a writable location.

 

The size of a .mapindexp file is significantly smaller than the size of an uncompressed LAS file on which it is built, but it is usually larger than the size of a compressed LAZ.   In the example above, the .mapindexp file is over three times the size of the .laz file.

Formatting the Drawing

Even though the data source for the linked .laz file is read-only, we can still format the drawing, with Manifold automatically storing the formatting in the associated .mapcache file.

 

 

We use a thematic format for point fill color as seen above, using a square point symbol with a stroke size of .5 point and a symbol size of 8 points.   We use the Color Brewer CB Spectral palette in reverse order.

 

Scanning data to acquire statistics when we press the Tally button typically takes 40 to 50 seconds on a data set this size, about 8 million points.   Once the data set is scanned, they will be saved while the window is open with no need to recalculate statistics when trying out different intervals for thematic formatting.

 

 

Using the thematic format provides a somewhat better visual preview of the data set.   The display shows LiDAR elevations for the Pentagon in the United States.

 

When images are re-styled, the visual results for the same palette may be slightly different as different sets of representative points are sampled by the data structure, based on the size of the viewing window.

 

 

When we zoom further into the data set, more points will appear, to provide a more detailed view as we zoom in.

 

 

More points will fill in as we zoom further into the data set, to the full resolution of the data set.  

 

 

When we save the project the .mapcache file will be saved with full information to speed up access to the linked file in the future, either from this project or from any other Manifold project that will link to the same .laz file.

 

 When we save the project, it will be very small, only one MB, since all of the LiDAR data remains stored in the .laz file.

Use Kriging to Create a Raster Image

Viewing LiDAR as colored points in a vector drawing is neither efficient nor appealing, at least not when points are thinned to representative samples..  We can do better by interpolating the vector point layer into a raster image using the Kriging transform template, as discussed in the Example: Vector to Raster using Kriging topic.

 

 

With the focus on the pentagon Drawing layer in the map, we switch to the Transform pane and choose the Interpolate, Kriging template.   The LiDAR data is fairly detailed so a resolution of 1 meter seems appropriate.   We press Add Component.   Manifold calculates for a minute or two, and the result is a new image in our Project pane.

 

 

We and drag and drop the new image created by Kriging into the map.   In the illustration above, we have double-click the drawing layer to turn it off.

 

The new image appears all white, for lack of contrast, until we use the Style pane to apply interpolated grayscale color:

 

 

We use the settings above, two intervals with interpolation from black to white, to apply grayscale color based on the single channel, the height, in the image.

 

 

The result is a grayscale image where higher heights are brighter.  That is an interesting effect, but we can do better by applying a colorful palette.

 

 

We apply a color palette, the CB Spectral palette in reverse order as seen above.  Press Update Style.

 

 

That provides a more interesting display.  We can make it more interesting by adding shading.

 

 

Switching to the Options tab in the Style pane, we check the Use shading box, use a Z scale of 0.003.  We press  Update Style.

 

 

The use of shading provides a nice, 3D effect.

 

 

We can zoom further into the image to see the effect that a one meter resolution image generated from detailed LiDAR data can provide.  The flat rectangle in the lower right of the window is the Metro-Pentagon station in the lower right corner.

 

Import a LAS or LAZ Format File

So far, this topic has shown how to link a LiDAR data file into a Manifold project.  Linking takes advantage of the specialized .mapindexp point index Manifold generates for point data as found in LiDAR files.  

 

We can, if we like, import a LAS file into a Manifold project, fetching the data from the file and bringing it into the Manifold project.   Importing the data into a Manifold file has the plus of very durable .map format, but it does mean that when we save the project the resulting .map file will likely be hundreds of megabytes or a few gigabytes in size.  

 

 

To import from LAS or LAZ format:

 

  1. Choose File-Import from the main menu.

  2. In the Import dialog browse to the folder containing data of interest.

  3. Double-click the file ending in .las or .laz for the data of interest.

  4. A table and a drawing will be created.

 

Example

Using the same pentagon.laz file as in the linking example, we choose File - Import and import the file.  

 

 

As before, we create a new data source using a Bing street maps image server as shown in the Example: An Imageserver Tutorial topic.   We then create a map and drag and drop the Bing layer into the map, and then we drag and drop the pentagon Drawing into the map.

 

 

When importing LiDAR data, current Manifold builds create an rtree spatial index on the data and, unlike the data structure used for linking, do not thin any points.  The entire data set is shown.   

 

 

Opening the drawing's table, we see it is fully read/write, since the data is fully resident in the .map project.

 

 

Switching to the Layers pane we see all attributes have been imported as well.

Format the Drawing

As with the linked example, we can use the Style  pane to assign a palette to color the elevation values in the drawing.

 

 

We use the Style pane to color the points using a palette, but slightly differently than in the linked example since we have a denser set of points.  We assign the same palette to coloring both the stroke color and fill color for points.    We have used the CB Spectral palette in reversed order.

 

 

That provides a more sensible display than in the linked example, where point thinning lowered the apparent resolution.

 

 

Zooming in, we can see better detail.

Use Kriging to Create a Raster Image

Even though we have all points displayed when importing LiDAR data, we can generate a better visual impression by using Kriging to create a smooth, raster surface.  It takes only a minute and a half to create a raster with Kriging, repeating the same steps used for Kriging interpolation in the linked file example.

 

We drag and drop the resulting image into our map. It appears all white, for lack of contrast, until we use the Style pane to apply interpolated grayscale color:

 

 

We use the settings above, two intervals with interpolation from black to white, to apply grayscale color based on the single channel, the height, in the image.

 

 

The result is a grayscale image where higher heights are brighter.  

 

 

 

We can apply a color palette, the CB Spectral palette in reverse order, plus hill shading, as seen above.

 

 

The image again appears very detailed because we have used Kriging to create a raster surface with a pixel at every meter.   The result is identical to the linked example, since the data is identical, the only difference being whether it is stored in the original LiDAR .laz file or stored, as a result of import, within the .map file.

 

A more detailed look at the same image is in the Gallery page of the Manifold website.

 

See Also

Style

 

Tables

 

Drawings

 

Maps

 

Images

 

Edit - Schema

 

Transform Pane

 

DEM, GTOPO30

 

GRD, ESRI .ASC, .GRD

 

GRD, Surfer .GRD

 

Example: Spectacular Images and Data from Web Servers

 

Example: An Imageserver Tutorial

 

Example: Vector to Raster using Kriging