2

I am trying to derive grid metrics from LiDAR (.las) file using FUSION's GridMetrics tool.

My problem is that the output raster from GridMetrics does not align with the base DTM used to run the tool.

Command:

E:\FUSION\gridmetrics.exe E:\FUSION\testy\N-34-138-B-
b-1-1-4-3.dtm 3 0.5 E:\FUSION\testy\gridmetrics.csv E:\FUSION\testy\*.las

Example:

Point is put on the "offset" pixel center.

Raster with "offset" on coordinates:

  • Pixel center coordinates are: (628933.5000, 496151.0000)
  • Pixel left-upper corner coordinates: (628933.2500, 496151.2500)

enter image description here

Raster with "proper" coordinates (and my DTM file that goes into GridMetrics):

  • Pixel center coordinates are: (628933.7500, 496150.7500)
  • Pixel left-upper corner coordinates: (628933.5000, 496151.0000)

enter image description here

How can I turn in GridMetrics to output proper pixel coordinates? I also have tried to use switch /extent

E:\FUSION\gridmetrics.exe /extent:E:\FUSION\testy\N-34-138-B-b-1-1-4-3.dtm E:\FUSION\testy\N-34-138-B-
b-1-1-4-3.dtm 3 0.5 E:\FUSION\testy\gridmetrics.csv E:\FUSION\testy\*.las

and /align:

E:\FUSION\gridmetrics.exe /align:E:\FUSION\testy\N-34-138-B-b-1-1-4-3.dtm E:\FUSION\testy\N-34-138-B-
b-1-1-4-3.dtm 3 0.5 E:\FUSION\testy\gridmetrics.csv E:\FUSION\testy\*.las 

with my DTM file to no avail.

The raster pixel size is 0.5m. The original DTM was created with LAStools lasgrid.

  • 1
    When I use grid or gridxy with origin of DTM there's no change in pixel corner coordinates. When i use grid with origin coordinates + 0.25m on both x and y I get desired result. So, as far as I understand pixel coordinates center (as .0, .0) is hardcoded and requires user to change origin in order to get .0, .0 on pixel corner? – James Ch Mar 14 at 15:07
  • You are right. +0.25 makes it look all right but in fact, it is moving columns in the wrong way. -0.25 is making pixel get the right place. Either way, we lose part of information due to moving origin. – James Ch Mar 14 at 15:44
  • By moving origin we lose part of column where points could lie. I may be mistaken. – James Ch Mar 15 at 13:23
2

Work around: use switches /grid:X,Y,W,H or gridxy:X1,Y1,X2,Y2 to manually offset the output grid by inputting its correct extent coordinates.


Misalignment cause (hypothesis):

Maybe the DTM's header is not being read correctly. It would explain both the misalignment with GridMetrics output and also switches /align and /extent not working, because they are based on the DTM (aka DEM).

Make some tests to corroborate if the DEM's header is related to the root cause.

First, make sure the DEM created from LAStools lasgrid is correctly aligned with the point cloud. You can overlay the point cloud over the DEM and visually inspect them, and you can compare the point cloud extents to the DEM's (run lasinfo to check point cloud extents).

If everything is OK with DEM (lets call it DEM 1), output it to an .asc file (use LAStools las2las tool) to check its header info.

If the header has:

  • XLLCENTER and YLLCENTER parameters, change them to XLLCORNER and YLLCORNER and minus offset coordinates with half of the cell size value.

  • Otherwise, if it has XLLCORNER and YLLCORNER parameters, change them to XLLCENTER and YLLCENTER and plus offset coordinates with half of the cell size value.

Convert it back to .dtm (LAStools las2las) and this is the DEM 2. Check if DEM 1 and DEM 2 are correctly aligned. Then, run GridMetrics again using DEM 2 and verify results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.