How to extract longitude-latitude-height information?

1,008 views
Skip to first unread message

sirgogo

unread,
Aug 14, 2016, 3:41:33 AM8/14/16
to LAStools - efficient tools for LiDAR processing, Martin Isenburg
Hello,

I think perhaps I am calling las2las with the wrong parameters; perhaps you could help me?

1. I have an input LAS
2. I want output CSV-type: t,x,y,z,i,a,n,r,c,u,p,d, LAT,LNG, HEIGHT?

The reason I want LAT,LNG,HEIGHT is because I'm working with geographically-relevant LiDAR, but I am unsure how the x,y,z numbers correspond.

The command I'm trying to use is:
$ ./las2las -target_latlong -i /data/s1750725.las -parse txyzianrcupd -o tmp.txt

Thanks for your help.

Kirk Waters - NOAA Federal

unread,
Aug 15, 2016, 7:14:42 AM8/15/16
to LAStools - efficient command line tools for LIDAR processing, Martin Isenburg
Since you're specifying a conversion to latitude, longitude  (-target_latlong), x will be latitude and y will be longitude. Alternatively, use -target_longlat to get x as longitude and y as latitude.

Z is going to be the elevation relative to the vertical datum of the data. Not knowing what data you're working with, I don't know what that will be. Most available data is referenced to an orthometric datum (in the U.S., that's probably NAVD88), but it doesn't have to be. You'll have to find out what your data is to know what your z coordinate references. If it's not the datum you're after, you'll need to find a way to convert. If it's something simple and you're in a small area, you may be able to apply an offset. In general, it will be a spatially varying relationship. 

Kirk Waters, PhD                     | NOAA Office for Coastal Management
Applied Sciences Program      | 2234 South Hobson Ave
843-740-1227                          | Charleston, SC 29405    

Martin Isenburg

unread,
Aug 15, 2016, 10:54:07 AM8/15/16
to LAStools - efficient tools for LiDAR processing, sirgogo
Hello,

with las2las (or las2txt) you can only output one set of coordinate for every point. If you want both projected coordinated (e.g. x and y in a UTM projection) as well as geographic coordinates (i.e. x and y in longitude / latitude) then you will have to export twice and merge the CSV file somehow. The z coordinate does not get affected when changing the horizontal representation of the coordinates and will be identical. Of course you could in addition make a ellipsoid to geoid transform to get different z coordinates. For example, one way of doing that is using 'lasheight' with an external geoidal grid as the '-ground_points' and then running with '-replace_z'.


But let's assume the z coordinate stays the same for the example below using 'fusa.laz'. Then you need to do two things. First output the CSV file with the projected coordinates using 'las2txt' and the '-sep comma' option.


D:\LAStools\bin>las2txt -i ..\data\fusa.laz -parse txyzianrcupd -sep comma -o fusa.txt
D:\LAStools\bin>more fusa.txt
5880.963028,277999.97,6122342.20,64.35,10,89,2,1,5,145,1,0
5880.963032,277999.97,6122342.53,64.30,15,89,1,1,5,144,1,0
5880.978038,277999.52,6122339.74,63.09,12,89,2,1,1,132,1,0
5880.978043,277999.55,6122340.05,62.88,12,89,2,1,1,129,1,0
5880.978047,277999.53,6122340.41,63.00,18,89,1,1,1,131,1,0
[...]

And then do the (un-)projection to long/lat with 'las2las' before running 'las2txt' again and outputting only xy to a second text file:


D:\LAStools\bin>las2las -i ..\data\fusa.laz -utm 54south -target_longlat -o fusa_ll.laz
using projection UTM 'WGS 84 / UTM zone 54S'
using target projection 'longitude/latitude'
D:\LAStools\bin>las2txt -i fusa_ll.laz -parse xy -sep comma -o fusa_ll.txt
D:\LAStools\bin>more fusa_ll.txt
138.5669092,-35.0172140
138.5669092,-35.0172110
138.5669036,-35.0172360
138.5669040,-35.0172333
138.5669039,-35.0172300
[...]

Now you have to merge those two CSV files 'fusa.txt' and 'fusa_ll.txt' somehow ... (-:

Regards,

Martin @rapidlasso

sirgogo

unread,
Aug 15, 2016, 3:34:54 PM8/15/16
to LAStools - efficient tools for LiDAR processing, rajagopa...@gmail.com
Thanks for the reply. I am having some trouble with one of the commands you suggested:

[LAStools/bin]$ ./las2las -i /srv/data/lidar-pcd/ogrip/FRANKLIN/LiDAR/s1750730.las -utm 54south -target_longlat -o fusa_II. laz
using projection UTM 'WGS 84 / UTM zone 54S'                                                                                        
using target projection 'longitude/latitude'                                                                                        
ERROR: cannot open file ''                                                                                                          
ERROR: cannot open lasreadertxt with file name ''                                                                                   
ERROR: could not open lasreader                                                                                                     
usage:                                                                                                                              
las2las -i *.las -utm 13N                                                                                                           
las2las -i *.laz -first_only -olaz                        
...

The data I'm using is LIDAR/LAS from Ohio OGRIP (http://gis3.oit.ohio.gov/geodatadownload/osip.aspx), and some XML metadata seems to indicate SR-ORG 6686 spatial reference: http://spatialreference.org/ref/sr-org/6686/.
Any ideas? Thanks again.

Kirk Waters - NOAA Federal

unread,
Aug 15, 2016, 4:13:51 PM8/15/16
to LAStools - efficient command line tools for LIDAR processing, rajagopa...@gmail.com
That wouldn't be in WGS84 UTM 54 South. I pulled down one of the Franklin county lidar files (LAS zipped, not LAZ) to have a look. The LAS file didn't have a georeferencing VLR at all. The metadata isn't using the tags I'd expect, but it is understandable with
     <cordsysn>
        <geogcsn>GCS_North_American_1983_CORS</geogcsn>
        <projcsn>NAD_1983_CORS_StatePlane_Ohio_South_FIPS_3402</projcsn>
      </cordsysn>
and a later reference to
 <identCode Sync="TRUE">NAD_1983_HARN_StatePlane_Ohio_South_FIPS_3402</identCode>

According to the EPSG registry, NAD 1983 (HARN) Ohio South in survey feet is EPSG code 3754. Your vertical coordinates are in NAVD88. I don't see an option in the "las2las -h" help about providing an EPSG code for the input projection, but the code indicates that the expected command option of "-epsg 3754" is what you would want instead of "-utm 54south" (where did that come from?).

Regarding the error messages you got, it looks a little like there is a space in the output file name before the "laz". That might cause problems.


Kirk Waters, PhD                     | NOAA Office for Coastal Management
Applied Sciences Program      | 2234 South Hobson Ave
843-740-1227                          | Charleston, SC 29405    

Evon Silvia

unread,
Aug 16, 2016, 1:56:11 AM8/16/16
to last...@googlegroups.com
​Kirk,

Regarding the "utm 54south", Martin recently​ added those shortcuts for those of us who've always found it confusing that the moniker "utm 54s" wasn't 54 South. Read more here:

Evon

Kirk Waters - NOAA Federal

unread,
Aug 16, 2016, 7:19:11 AM8/16/16
to LAStools - efficient command line tools for LIDAR processing
Evon,
Thanks. I knew he'd added those. What I meant was, what information was making him think that the data was in UTM zone 54 south WGS84. For the Ohio data, that's the wrong projection, wrong zone in that projection, wrong hemisphere, and wrong ellipsoid.

Kirk
Reply all
Reply to author
Forward
0 new messages