Adding new epsg code into the list of other epsg code in lasTools/bin/serf/geo/pcs file.

410 views
Skip to first unread message

Mukund Thakare

unread,
May 27, 2022, 7:08:59 AM5/27/22
to LAStools - efficient tools for LiDAR processing
Hello all,
I am new to the lass tools, I have exploring the epsg codes supported by the lass tools.

What I want to do ?
I have a point cloud file in .las format and I want to update the epsg code in it.
I have to 2 epsg code - 
EPSG:6674 - https://epsg.io/6674
EPSG:6695  - (6695 is for giving the height for point cloud) https://epsg.io/6695

I am using
las2las.exe -i "mypointcloud.las" -o "mypointcloudoutput.las" -epsg 6674+6695
but this command seems to be not working.

then I tried two different commands - 
las2las.exe -i "mypointcloud.las" -o "mypointcloud6674.las" -epsg 6674

output file above command I used for further process -  
las2las.exe -i "mypointcloud6674.las" -o "mypointcloudoutput6695.las" -epsg 6695

this last command gave me an error.
6695.PNG

I need help in applying two epsg code to the same file.
how can I apply two epsg code for same file (one for horizontal datum and one for vertical datum ) ?
also if any epsg is not present then how should I update the lasTools with new epsg to use ?

I hope my question is clear, if not please ping in waiting for answers and discussions.
Thank you.

Kirk Waters - NOAA Federal

unread,
May 27, 2022, 7:15:50 AM5/27/22
to LAStools - efficient command line tools for LIDAR processing
There is a -vertical_epsg argument for the vertical component. It's in the code, but I don't see it in the help from the -h option.

Kirk Waters, PhD 
NOAA Office for Coastal Management
Applied Sciences Program      
‪Phone: 843-284-6962‬ (New as of 2022)    




--
Download LAStools at
https://rapidlasso.de
Manage your settings at
https://groups.google.com/g/lastools/membership
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/7b8935ba-4d8c-4aed-9120-2fc8d31d4a90n%40googlegroups.com.

Jorge Delgado García

unread,
May 27, 2022, 7:16:00 AM5/27/22
to last...@googlegroups.com
Dear Munkund,

You can include new EPSG systems in the system ... you can added the system into the different CSV files included in \lastools\bin\serf\geo

Jorge

--
Download LAStools at
https://rapidlasso.de
Manage your settings at
https://groups.google.com/g/lastools/membership
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/7b8935ba-4d8c-4aed-9120-2fc8d31d4a90n%40googlegroups.com.


--

Jeff McKenna

unread,
May 27, 2022, 7:56:56 AM5/27/22
to LAStools - efficient tools for LiDAR processing
for background: I was providing Martin with epsg (PROJ) builds (from MS4W).  I'm not sure anyone outside knew of this connection between the two popular projects.  However so much has changed in recent PROJ releases, that likely much of the LAStools code would need to be adapted (or maybe this is planned already) to connect to the PROJ library (as it is now driven from an SQLite database of tables and codes).  Just sharing here, in case others wonder.

-jeff


--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/

MUKUND THAKARE

unread,
May 27, 2022, 8:15:19 AM5/27/22
to LAStools - efficient tools for LiDAR processing
Hello Kirk,
Can you please help me to get this code ? is it open source ?
Also have you faced such a problem before of updating vertical datum epsg ?

Thank you !!

MUKUND THAKARE

unread,
May 27, 2022, 8:18:47 AM5/27/22
to LAStools - efficient tools for LiDAR processing
Hello Jorge, 
Do you have any sample or example updating epsg info in these file ?

Thanks !!

Kirk Waters - NOAA Federal

unread,
May 27, 2022, 9:31:26 AM5/27/22
to LAStools - efficient command line tools for LIDAR processing

It's on github. https://github.com/LAStools
las2las is open, though many of the tools are not. You'll notice that it's looking in the pcs.csv file, which is for projected coordinate systems. It may already be in the vertical coordinate system list, but you didn't specify it that way.
As Jeff said, it would be helpful if the tools moved to use the proj database directly.

Kirk


Mukund Thakare

unread,
May 30, 2022, 6:24:29 AM5/30/22
to LAStools - efficient tools for LiDAR processing
Hello kirk,
thank you for your reply.
I have currently edited the pcs.csv by adding the 6695 ( verticle datum information ) information.
but it seems the exe's are still not able to retrieve the information.
I get below error when I do 
las2las.exe -i "pointcloud.las" -o "pointcloud6695.las" -epsg 6695.
unknown epsg.PNG

I have also attached my pcs.csv with this response please check.

thank you.
pcs.csv

Michael Perdue

unread,
May 30, 2022, 10:18:11 AM5/30/22
to LAStools - efficient command line tools for LIDAR processing
Hello,

Adding your vertical CRS to the pcs.csv will not work. That is intended for projected coordinate systems. If you had a new vertical CRS that you wanted to add, it would be added to the vertcs.csv file. However, as Kirk suggested, if you peruse through the vertcs.csv file you will find that 6695 is already in there.

As Kirk also mentioned, there is a seperate (un-documented) flag in the code for using vertical EPSG codes. IE, you command should look something like this:
las2las.exe -i "pointcloud.las" -o "pointcloud6695.las" -epsg 6674 -vertical_epsg 6695

Mike





Mukund Thakare

unread,
May 31, 2022, 3:16:36 AM5/31/22
to LAStools - efficient tools for LiDAR processing
Hello Mike,
Thank you so much for your reply, it is life saver.
The command "las2las.exe -i "pointcloud.las" -o "pointcloud6695.las" -epsg 6674 -vertical_epsg 6695" works fine !!
Adding snap of lasInfo.exe - 
addedInfo.PNG


However, when I analyzed data for same las file with EPSG:6677 and with EPSG:6677 & 6695 there is not height difference in the points.
Let me add snaps.
1) Below snap consist the point cloud points with EPSG:6677, 
command used: las2las.exe -i "MyPointCloud.las" -o "MyPointCloud_6677.las" -epsg 6677
6677.PNG
 2)  Below snap consist the point cloud points with EPSG:6677 & EPSG: 6695
command used: las2las.exe -i "MyPointCloud.las" -o "MyPointCloud_6677_6695.las" -epsg 6677 -vertical_epsg 6695
6677_6695.PNG

Since we say 6695 lift the data up by some height, then there should be difference in z-coordinate for both file by some factor, but they are same.
How do I get points with the height factor added by EPSG:6695 ?

Let me add original las file with this reply, please fins the attachment. 

Thank you.
Happy learning.
Waiting for your answer.
MyPointCloud.las

Jorge Delgado García

unread,
May 31, 2022, 3:23:04 AM5/31/22
to last...@googlegroups.com
Sorry, could you send an example of the original data? What is the EPSG of the original data?

I want to try using a coordinate converter ...

Jorge



--

Mukund Thakare

unread,
May 31, 2022, 3:27:33 AM5/31/22
to LAStools - efficient tools for LiDAR processing
Hello Jorge,
I have added example point cloud in above reply.
the original file does not have any EPSG in it, No VLR information.

thank you.

Jorge Delgado García

unread,
May 31, 2022, 4:07:06 AM5/31/22
to last...@googlegroups.com
Then the problem is different. It is not necessary to convert anything, it is only necessary to indicate that your data conforms to these systems. Therefore, you do not have to have any variation in your data, understanding that these data already conform to these coordinate reference systems (horizontal and vertical).

The order you propose is correct
las2las -i mypointcloud.las -o pointcloud_6674_6695.laz -epsg 6674 -vertical_epsg 6695

Just a detail (something that Martin always reminded us) when sending a file to the group it is better to do it in LAZ format (even if this file is very small) so the space will be optimized.

I send you the LASinfo result file where you can check that the LAZ file is already in that CRS (horizontal and vertical) as well as in other commercial software where I have checked it to get out of doubts.

imagen.png



Jorge



--
pointcloud_6674_6695_info.txt

Mukund Thakare

unread,
May 31, 2022, 6:46:39 AM5/31/22
to LAStools - efficient tools for LiDAR processing
Hello Jorge,
Thank you for the explanation.
Now I am able to understand that EPSG's indicate that the data in the file conforms to the coordinate reference system, and It's not necessary that points will change when we change the EPSG. 

Just a curious observation.
So when I use, 
las2las.exe -i "MyPointCloud_6677_6695.las" -target_epsg 4978 -o "MyPointCloud_4978.las"
data in the file do get change.
Adding snaps, over same point cloud shared in the earlier thread.
Below snap shows data point with EPSG:6677 + EPSG:6695.
6677_6695.PNG

Below snap shows data points with above file having EPSG:6677 & EPSG:6695 transformed to EPSG:4978 CRS.
With Command 
 : las2las.exe -i "MyPointCloud_6677_6695.las" -target_epsg 4978 -o "MyPointCloud_4978.las"
4978.PNG


So question is in this case data point's do get transformed contradicting your argument that data don't need to be transformed ?



Happy learning.
Waiting for your answer.
Thank you.

Jorge Delgado García

unread,
May 31, 2022, 7:36:55 AM5/31/22
to last...@googlegroups.com
Hi Mukund,

There are several different cases...

1) If your data has no EPSG associated with it (horizontal and/or vertical) when you incorporate the code using LAS2LAS the resulting data will have the code. Logically you have to make sure that the data you are using is in accordance with that reference system. This EPSG will be read by most software that uses geographic information.
2) If your data already have a specific EPSG code(s) associated and through LAS2LAS you indicate that the -target_epsg or -vertical_epsg is another one, then the system performs the corresponding transformations between the input CRS (coordinate reference system) and the desired output one.

Therefore, in the first case, there is no change (it would be case 1) while in the second case there are changes in the coordinates (it would be case 2).

I hope everything is clear, sorry for my previous answer, it was a bit fast.

Jorge









--

Mukund Thakare

unread,
May 31, 2022, 8:15:59 AM5/31/22
to LAStools - efficient tools for LiDAR processing
Hello Jorge,
Thank you for your detailed the explanation.
I do understand the 1 case you mentioned.
Sorry but I am confused with 2nd case since you mentioned -vertical_epsg can change the coordinates, since I have already added an thread were I discussed about coordinates are not getting changed using -vertical_epsg.

Snap of confusing part in 2nd case - 
contradiction1.PNG

Snap of the trad where I have discussed using -vertical_epsg coordinates does not change.
proofcontradiction.PNG


Anyways,
I need the final point cloud points\coordinates after this horizontal (EPSG:6677) & vertical (EPSG: 6695) datum transformation's done ? is it possible to get these coordinates with lasTools ?

Happy learning.
Thank you !!

Jorge Delgado García

unread,
May 31, 2022, 10:00:57 AM5/31/22
to last...@googlegroups.com
No ... you are in case 1 because your original data has no EPSG code defined, so there is no real coordinate conversion only code assignment.

In case 2, you perform the coordinate conversion ... depending of the EPSG codes (inputs and outputs) you can modify coordinates if the EPSG codes definen different reference systems (horizontal and vertical).

Jorge



--

michaelperdue99

unread,
May 31, 2022, 10:39:03 AM5/31/22
to LAStools - efficient tools for LiDAR processing
Applying a geoid - a vertical datum transformation - is never performed by las2las. In short:

Use las2las to reproject your data.
Use lasdatum to apply a horizontal datum transformation.
Use lasvdatum to apply a vertical datum transformation.

Note that lasdatum is somewhat limited in its ability to apply datum transformations. It does not support 4D time dependant transformations or velocity grids.

Mike

Reply all
Reply to author
Forward
0 new messages