[GIS] Problem with Y offset shift of LAS file (las2las)

laslastoolslidar

I'm trying to set the origin of a georeferenced .las point cloud to be coordinates 0,0,0, essentially stripping the georeferencing. The only way I could think to do this was subtract the minimum X, Y and Z value of each point using lastools (las2las). I was able to do this with the X and Z coordinates, but when I subtracted the Y coordinates something strange happened: starting with a minimum Y value 2,887,191 I subtracted 2,887,191 and got 4,294,967. I haven't been able to get it to 0.

Anyone have any idea what's happening here?

EDIT:

To be clear: I'm interested in setting the minimum x,y and z values of the .las file to 0, 0 and 0, ignoring the header and stripping georeferencing entirely but preserving the spatial relationship of the points. The best mathematical way I can think to do this is to subtract the minimum values of each axis from every point. Does anyone know of tools that can do that?

Best Answer

Fusion LTK has a tool specifically for what you are trying to do. Its name is ClipData.

You'll need two switches (variations of the command line) to accomplish the task. The first switch is the biaselev:# (bias elevation of number equal to #). From Fusion's manual:

biaselev:# Add an elevation offset to every LIDAR point: # can be + or -.

So, let's say the minimum z value is 702, then, you would have /biaselev:702 to subtract all z coordinates with 702.

The second switch, which offsets x and y, is the nooffset. See its description from the manual:

nooffset: Produce an output point file that no longer has the correct georeferencing. This is used when you need to work with the point cloud but cannot reveal the actual location of the features represented in the point cloud. This option modifies the header values in the LAS header for the output files.

The complete command line for your case would be written like the following:

/ClipData /biaselev:# /nooffset InputSpecifier SampleFile [MinX MinY MaxX MaxY]

where InputSpecifier is the gross lidar cloud (.las file), the SampleFile is the new .las file with the offsets and [MinX MinY MaxX MaxY] are the minimums and maximums x and y from the gross lidar cloud, respectively.

Here I wrote a detailed answer which teaches how to use ClipData that you can adapt for your case using information from this post.

Just to exemplify that this works, I ran a test with one file of mine. Here is a screenshot of the new .las file's header.

enter image description here

Related Question