Re: [LAStools] Projecting LAS files, What am I doing wrong?

1,932 views
Skip to first unread message

Ty Kennedy-Bowdoin

unread,
Feb 20, 2013, 8:18:38 PM2/20/13
to lastools
I dont know that much about state plane projections and dont have a full fledged answer, but I have a few quick comments:
  1. lastools uses the actual zone letters for utm zones (http://www.dmap.co.uk/utmworld.htm). So Washington would be 10T or 10U not 10N (which is near the equator). I doubt this is causing your problem, but you should be careful with this. For example 10S is in the northern hemisphere not the southern as you might expect if you thought that S indicated South.
  2. If the -target_UTM auto option puts you in the southern hemisphere, most likely something about your   source projection is incorrect. It might be good to print the projection that is listed in the las header with lasinfo and post it on here. You seem to know that it is State Plane HARN NAD83 WA_S, but it would be good to know that the las file header agrees.
  3. You dont necessarily have to set the source projection explicitly in your las2las syntax. Lastools will assume that you are reprojecting from the projection in the header if you dont set it. So you might just try setting your target info but not your source info.
someone with more experience with state plane projections might have a better answer, but thats where I would start to trouble shoot your problem.

best of luck,
Cheers,
Ty


On Wed, Feb 20, 2013 at 8:58 AM, <lguy...@yahoo.com> wrote:
Hi,
I have been trying to project an LAS file from State Plane HARN NAD83 WA_S coordinates
to UTM 10. 
The result ends up in the wrong place.  Y coordinate is up in Canada,
not Pierce County WA.  Also ends up way to the east.
Projection definition on the result LAS is also unchanged.  Still  listed as WA_S
>
Here is the syntax I am trying:
las2las -i fnin.las -o  fnout_UTM.las -olas -nad83 -feet -sp83 WA_S -target_utm 10N -target_meters -target_elevation_meters -verbose
>
> Output text:
> using ellipsoid '11 - GRS 1980 (NAD-83) (6.37814e+006 0.00669438)'
> using state plane 'WA_S' (NAD83 LCC) 'stateplane83 WA_S'
> using target projection UTM 'UTM 10 northern hemisphere'
> reading 8842740 and writing all surviving points ...
> total time: 15.278 sec. written 8842740 surviving points.
>
 
I ditched the -nad83 option, and now it appears to be projecting correctly.  At least it ends up in WA ...
Projection info in the header is STILLwrong.

I also tried the "-target_UTM auto" option.  It gave an error message about not finding UTM 10
in the southern hemisphere, and again did not set the projection in the header.
>
Do you have any suggestions to change the command line?  So the projection information is
correct?

Thanks!
Guy McWethy
Weyerhaeuser Corp
Federal Way, WA

--
Download LAStools at
http://lastools.org
http://rapidlasso.com
Be social with LAStools at
http://facebook.com/LAStools
http://twitter.com/LAStools
http://linkedin.com/groups/LAStools-4408378
Manage your settings at
http://groups.google.com/group/lastools/subscribe
 
 



--
Ty Kennedy-Bowdoin
Carnegie Institution for Science
260 Panama St.
Stanford, CA 94305
USA
+1 831 227-3885
Skype: Ty.bowdoin

Wheeler, Rick

unread,
Feb 20, 2013, 9:25:20 PM2/20/13
to last...@googlegroups.com
Hi There,

Launch the GUI by entering las2las on the command line without any options. Then select your file and select the input and output projection parameters. When you select run it gives you the command line parameters. This helps me get the projection parameters correct for future command line usage etc.

Thanks

________________________________
From: last...@googlegroups.com [last...@googlegroups.com] on behalf of lguy...@yahoo.com [lguy...@yahoo.com]
Sent: February 20, 2013 1:28 PM
To: last...@googlegroups.com
Subject: [LAStools] Projecting LAS files, What am I doing wrong?

Martin Isenburg

unread,
Feb 21, 2013, 9:56:39 PM2/21/13
to last...@googlegroups.com
Hello,

in the meantime Guy has let me have a look at his data and a quick run with "lasinfo" (see end of email) shows me that the software that exported his LAS file does not conform to the LAS 1.2 specification in terms of reporting the projection information. Instead of using a GeoTIFF tag, the software used the "record ID" field to specify the ProjectedCSTypeGeoKey as 32149 (aka PCS_NAD83_Washington_South) as this excerpt shows

[...]
variable length header record 1 of 1:
  reserved             0
  user ID              'LASF_Projection ò}'
  record ID            32149
  length after header  0
  description          'FIPS 4602 - U.S.Survey Feet     E'
[...]

on top of that the "user ID" field is corrupt (i.e. there is a space instead of a '\0' character after the 'n' of LASF_Projection) as well and the description field makes me worry that there is something else amiss especially since it is followed by some - possibly random - byte.

[...]
the header is followed by 1 user-defined bytes
[...]

I suggest you inform whomever generated this data that there are issues with the LAS exporter of their software. This LAS file will certainly not pass the upcoming ASPRS LAS validator test ... (-:

You can fix the file as follows:

las2las -i ARRA-WA_PierceCo_2010_11785600.las ^
            -remove_all_vlrs ^
            -auto_reoffset ^
            -sp83 WA_S -survey_feet -elevation_feet ^
            -o ARRA-WA_PierceCo_2010_11785600_sp83.laz

And you can re-project the file as follows:

las2las -i ARRA-WA_PierceCo_2010_11785600.las ^
            -remove_all_vlrs ^
            -sp83 WA_S -survey_feet -elevation_feet ^
            -target_utm 10N ^
            -o ARRA-WA_PierceCo_2010_11785600_utm.laz

Do this for a folder of LAS files on 7 cores with:

las2las -i *.las ^
            -remove_all_vlrs ^
            -sp83 WA_S -survey_feet -elevation_feet ^
            -target_utm 10N ^
            -odix _utm -olaz ^
            -cores 7


The LAS file correctly reprojects as UTM as evidenced by the geo-referenced hill-shaded bare-earth PNG-KML-combo that I generate with blast2dem as shown below (and that is attached) and that shows up at the right spot in Google Earth:

blast2dem -i ARRA-WA_PierceCo_2010_11785600_utm.laz ^
                 -keep_class 2 ^
                 -step 2 -hillshade ^
                 -opng

Regards,

Martin @rapidlasso

--
http://rapidlasso.com - fast tools to convert LiDARs

+++++++++++++++++++++++++++++++++++++++++++++++++++
+++    original file
+++++++++++++++++++++++++++++++++++++++++++++++++++

C:\lastools\bin>lasinfo ARRA-WA_PierceCo_2010_11785600.las
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            1
  project ID GUID data 1-4:   00000000-0000-0000-2020-202020202020
  version major.minor:        1.2
  system identifier:          'Watershed Sciences - ALS        '
  generating software:        'LiDAR Feature Extraction (LFEx) '
  file creation day/year:     166/2011
  header size:                227
  offset to point data:       282
  number var. length records: 1
  point data format:          1
  point data record length:   28
  number of point records:    8700397
  number of points by return: 6483308 1839011 351398 26680 0
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               0 0 0
  min x y z:                  1178001.02 557001.02 631.79
  max x y z:                  1181000.98 560000.98 918.53
variable length header record 1 of 1:
  reserved             0
  user ID              'LASF_Projection ò}'
  record ID            32149
  length after header  0
  description          'FIPS 4602 - U.S.Survey Feet     E'
the header is followed by 1 user-defined bytes
reporting minimum and maximum for all LAS point record entries ...
  X  117800102  118100098
  Y   55700102   56000098
  Z      63179      91853
  intensity 0 255
  edge_of_flight_line 0 0
  scan_direction_flag 0 1
  number_of_returns_of_given_pulse 1 4
  return_number                    1 4
  classification      1     7
  scan_angle_rank   -14    11
  user_data         116   129
  point_source_ID   483   487
  gps_time -19378056.949865 -19375724.906468
overview over number of returns of given pulse: 4641649 2976603 975259 106886 0 0 0
histogram of classification of points:
         7213428  Unclassified (1)
         1144796  Ground (2)
          342173  Low Point (noise) (7)

+++++++++++++++++++++++++++++++++++++++++++++++++++
+++    repaired file
+++++++++++++++++++++++++++++++++++++++++++++++++++

C:\lastools\bin> lasinfo ARRA-WA_PierceCo_2010_11785600_sp83.laz
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            1
  project ID GUID data 1-4:   00000000-0000-0000-2020-202020202020
  version major.minor:        1.2
  system identifier:          'LAStools (c) by Martin Isenburg'
  generating software:        'las2las (version 130221)'
  file creation day/year:     166/2011
  header size:                227
  offset to point data:       322
  number var. length records: 1
  point data format:          1
  point data record length:   28
  number of point records:    8700397
  number of points by return: 6483308 1839011 351398 26680 0
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               1100000 500000 0
  min x y z:                  1178001.02 557001.02 631.79
  max x y z:                  1181000.98 560000.98 918.53
variable length header record 1 of 1:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34735
  length after header  40
  description          'by LAStools of Martin Isenburg'
    GeoKeyDirectoryTag version 1.1.0 number of keys 4
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 3072 tiff_tag_location 0 count 1 value_offset 32149 - ProjectedCSTypeGeoKey: PCS_NAD83_Washington_South
      key 3076 tiff_tag_location 0 count 1 value_offset 9003 - ProjLinearUnitsGeoKey: Linear_Foot_US_Survey
      key 4099 tiff_tag_location 0 count 1 value_offset 9002 - VerticalUnitsGeoKey: Linear_Foot
the header is followed by 1 user-defined bytes
LASzip compression (version 2.1r0 c2 50000): POINT10 2 GPSTIME11 2
reporting minimum and maximum for all LAS point record entries ...
  X    7800102    8100098
  Y    5700102    6000098
  Z      63179      91853
  intensity 0 255
  edge_of_flight_line 0 0
  scan_direction_flag 0 1
  number_of_returns_of_given_pulse 1 4
  return_number                    1 4
  classification      1     7
  scan_angle_rank   -14    11
  user_data         116   129
  point_source_ID   483   487
  gps_time -19378056.949865 -19375724.906468
overview over number of returns of given pulse: 4641649 2976603 975259 106886 0 0 0
histogram of classification of points:
         7213428  Unclassified (1)
         1144796  Ground (2)
          342173  Low Point (noise) (7)

+++++++++++++++++++++++++++++++++++++++++++++++++++
+++    reprojected file
+++++++++++++++++++++++++++++++++++++++++++++++++++

C:\lastools\bin>lasinfo ARRA-WA_PierceCo_2010_11785600_utm.laz
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            1
  project ID GUID data 1-4:   00000000-0000-0000-2020-202020202020
  version major.minor:        1.2
  system identifier:          'LAStools (c) by Martin Isenburg'
  generating software:        'las2las (version 130221)'
  file creation day/year:     166/2011
  header size:                227
  offset to point data:       322
  number var. length records: 1
  point data format:          1
  point data record length:   28
  number of point records:    8700397
  number of points by return: 6483308 1839011 351398 26680 0
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               500000 5100000 0
  min x y z:                  549669.04 5188245.79 192.57
  max x y z:                  550611.58 5189188.32 279.97
variable length header record 1 of 1:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34735
  length after header  40
  description          'by LAStools of Martin Isenburg'
    GeoKeyDirectoryTag version 1.1.0 number of keys 4
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 3072 tiff_tag_location 0 count 1 value_offset 26910 - ProjectedCSTypeGeoKey: PCS_NAD83_UTM_zone_10N
      key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
      key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
the header is followed by 1 user-defined bytes
LASzip compression (version 2.1r0 c2 50000): POINT10 2 GPSTIME11 2
reporting minimum and maximum for all LAS point record entries ...
  X    4966904    5061158
  Y    8824579    8918832
  Z      19257      27997
  intensity 0 255
  edge_of_flight_line 0 0
  scan_direction_flag 0 1
  number_of_returns_of_given_pulse 1 4
  return_number                    1 4
  classification      1     7
  scan_angle_rank   -14    11
  user_data         116   129
  point_source_ID   483   487
  gps_time -19378056.949865 -19375724.906468
overview over number of returns of given pulse: 4641649 2976603 975259 106886 0 0 0
histogram of classification of points:
         7213428  Unclassified (1)
         1144796  Ground (2)
          342173  Low Point (noise) (7)

On Thu, Feb 21, 2013 at 4:18 PM, <lguy...@yahoo.com> wrote:

This is what I am currently using:

las2las -i fnin.las -o ../LAS_UTM/fnin_UTM.las -olas -sp83 WA_S -feet –elevation_feet -target_utm 10T -target_elevation_meters –verbose
 
Won’t work if use “-utm”, need the “Target_utm”.  Need 10T rather than 10N.
Also needed to specify the input projection.  These are older files and the projection info may not have been compatible with las2las.
also need to specify -elevation_feet to get the Z conversion to work correctly.
 
This appears to be working great!  Elevations and XY line up with other data sets.

Guy McWethy
ARRA-WA_PierceCo_2010_11785600_utm.kmz

Jacob Edwards

unread,
Jul 13, 2017, 3:59:50 PM7/13/17
to LAStools - efficient tools for LiDAR processing

Hello,

 

I have been trying project Las points into EPSG 2992 from NAd83 Oregon State Plane North Feet, international feet.

 

The original data did not have projection information, I tried adding headers through Las tools in ArcCatalog. Points are showing up in proper location but the header information looks like this:  

 

 

I have been trying to add corrected VLR information but I keep getting this error:

 

 

I have tried using the –target epsg 2992 or 2269 command line but keep receiving the same geo\pcs.csv file error.

 

 

I am using the 6/28/2017 version of las tools.

 

Any help adding Oregon State Plane North header information into current points and then converting to epsg 2992 or 2269 -(NAD83 OGIC international feet)  would be very appreciated!

 

-Jacob Edwards
Auto Generated Inline Image 1
Auto Generated Inline Image 2
Auto Generated Inline Image 3

Martin Isenburg

unread,
Jul 14, 2017, 6:11:56 AM7/14/17
to LAStools - efficient command line tools for LIDAR processing
Hello,

seems like your LAStools installation is either incomplete or the LAStools modules are called from the wrong PATH so they they cannot find the pcs.csv file. I suggest running your command either via the native LAStools GUI of las2las.exe (just double-click the executable las2las.exe in the LAStools/bin folder) or via the command line (that makes no actual sense but shows that it is possible to set EPSG code 32126 or 2992):

E:\LAStools\bin>las2las -i ..\data\fusa.laz ^
                                      -epsg 32126 -feet ^
                                      -elevation_feet ^
                                      -o fusa_32126.laz

E:\LAStools\bin>las2las -i ..\data\fusa.laz ^
                                      -epsg 2992 ^
                                      -elevation_feet ^
                                      -o fusa_2992.laz

For the second call the '-feet' is not needed because the fact that horizontal units are in "linear feet" is already part of the EPSG 2992 code specification. Note ... to *project* or *reproject* one needs a source and a target projection with the same datum. All the command lines above are doing is to *add* missing or to *overwrite* wrong projection information without actually changing the point coordinate to a new projection.

Here how to do the reprojection (which will be correct as both projections use the NAD83 datum). Note in the lasinfo reports below that in these three (senseless because fusa.laz really is UTM 55south) that this call actually *changes* the coordinates in x and y direction to the new projection.

----------------------------------

E:\LAStools\bin>las2las -i ..\data\fusa.laz ^
                                      -epsg 32126 -feet ^
                                      -elevation_feet ^
                                      -target_epsg 2992 ^
                                      -target_elevation_feet ^
                                      -o fusa_reprojected.laz

E:\LAStools\bin>lasinfo fusa_32126.laz
lasinfo (170628) report for fusa_32126.laz
  file source ID:             0
  global_encoding:            0
  project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
  version major.minor:        1.1
  system identifier:          'LAStools (c) by rapidlasso GmbH'
  generating software:        'las2las (version 170713)'
  file creation day/year:     40/2010
  header size:                227
  offset to point data:       321
  number var. length records: 1
  point data format:          1
  point data record length:   28
  number of point records:    277573
  number of points by return: 263413 13879 281 0 0
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               0 0 0
  min x y z:                  277750.00 6122250.00 42.21
  max x y z:                  277999.99 6122499.99 64.35
variable length header record 1 of 1:
  reserved             0
  user ID              'LASF_Projection'
  record ID            34735
  length after header  40
  description          'by LAStools of rapidlasso GmbH'
    GeoKeyDirectoryTag version 1.1.0 number of keys 4
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 3072 tiff_tag_location 0 count 1 value_offset 32126 - ProjectedCSTypeGeoKey: NAD83 / Oregon North
      key 3076 tiff_tag_location 0 count 1 value_offset 9002 - ProjLinearUnitsGeoKey: Linear_Foot
      key 4099 tiff_tag_location 0 count 1 value_offset 9002 - VerticalUnitsGeoKey: Linear_Foot
LASzip compression (version 3.0r1 c2 50000): POINT10 2 GPSTIME11 2
reporting minimum and maximum for all LAS point record entries ...
  X            27775000   27799999
  Y           612225000  612249999
  Z                4221       6435
  intensity          10      62293
  return_number       1          3
  number_of_returns   1          3
  edge_of_flight_line 0          0
  scan_direction_flag 0          0
  classification      1          6
  scan_angle_rank    79        103
  user_data           0        197
  point_source_ID     1          1
  gps_time 5880.963028 5886.739738
number of first returns:        263413
number of intermediate returns: 283
number of last returns:         263370
number of single returns:       249493
overview over number of returns of given pulse: 249493 27232 848 0 0 0 0
histogram of classification of points:
           17553  unclassified (1)
          180868  ground (2)
           37030  high vegetation (5)
           42122  building (6)

-------------------------------------

E:\LAStools\bin>lasinfo fusa_2992.laz
lasinfo (170628) report for fusa_2992.laz
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            0
  project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
  version major.minor:        1.1
  system identifier:          'LAStools (c) by rapidlasso GmbH'
  generating software:        'las2las (version 170713)'
  file creation day/year:     40/2010
  header size:                227
  offset to point data:       321
  number var. length records: 1
  point data format:          1
  point data record length:   28
  number of point records:    277573
  number of points by return: 263413 13879 281 0 0
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               0 0 0
  min x y z:                  277750.00 6122250.00 42.21
  max x y z:                  277999.99 6122499.99 64.35
variable length header record 1 of 1:
  reserved             0
  user ID              'LASF_Projection'
  record ID            34735
  length after header  40
  description          'by LAStools of rapidlasso GmbH'
    GeoKeyDirectoryTag version 1.1.0 number of keys 4
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 3072 tiff_tag_location 0 count 1 value_offset 2992 - ProjectedCSTypeGeoKey: NAD83 / Oregon GIC Lambert (ft)
      key 3076 tiff_tag_location 0 count 1 value_offset 9002 - ProjLinearUnitsGeoKey: Linear_Foot
      key 4099 tiff_tag_location 0 count 1 value_offset 9002 - VerticalUnitsGeoKey: Linear_Foot
LASzip compression (version 3.0r1 c2 50000): POINT10 2 GPSTIME11 2
reporting minimum and maximum for all LAS point record entries ...
  X            27775000   27799999
  Y           612225000  612249999
  Z                4221       6435
  intensity          10      62293
  return_number       1          3
  number_of_returns   1          3
  edge_of_flight_line 0          0
  scan_direction_flag 0          0
  classification      1          6
  scan_angle_rank    79        103
  user_data           0        197
  point_source_ID     1          1
  gps_time 5880.963028 5886.739738
number of first returns:        263413
number of intermediate returns: 283
number of last returns:         263370
number of single returns:       249493
overview over number of returns of given pulse: 249493 27232 848 0 0 0 0
histogram of classification of points:
           17553  unclassified (1)
          180868  ground (2)
           37030  high vegetation (5)
           42122  building (6)

-------------------------------

E:\LAStools\bin>lasinfo -i fusa_reprojected.laz
lasinfo (170628) report for fusa_reprojected.laz
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            0
  project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
  version major.minor:        1.1
  system identifier:          'LAStools (c) by rapidlasso GmbH'
  generating software:        'las2las (version 170713)'
  file creation day/year:     40/2010
  header size:                227
  offset to point data:       321
  number var. length records: 1
  point data format:          1
  point data record length:   28
  number of point records:    277573
  number of points by return: 263413 13879 281 0 0
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               -6600000 6800000 0
  min x y z:                  -6646141.35 6802268.89 42.21
  max x y z:                  -6645888.73 6802521.48 64.35
variable length header record 1 of 1:
  reserved             0
  user ID              'LASF_Projection'
  record ID            34735
  length after header  40
  description          'by LAStools of rapidlasso GmbH'
    GeoKeyDirectoryTag version 1.1.0 number of keys 4
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 3072 tiff_tag_location 0 count 1 value_offset 2992 - ProjectedCSTypeGeoKey: NAD83 / Oregon GIC Lambert (ft)
      key 3076 tiff_tag_location 0 count 1 value_offset 9002 - ProjLinearUnitsGeoKey: Linear_Foot
      key 4099 tiff_tag_location 0 count 1 value_offset 9002 - VerticalUnitsGeoKey: Linear_Foot
LASzip compression (version 3.0r1 c2 50000): POINT10 2 GPSTIME11 2
reporting minimum and maximum for all LAS point record entries ...
  X            -4614135   -4588873
  Y              226889     252148
  Z                4221       6435
  intensity          10      62293
  return_number       1          3
  number_of_returns   1          3
  edge_of_flight_line 0          0
  scan_direction_flag 0          0
  classification      1          6
  scan_angle_rank    79        103
  user_data           0        197
  point_source_ID     1          1
  gps_time 5880.963028 5886.739738
number of first returns:        263413
number of intermediate returns: 283
number of last returns:         263370
number of single returns:       249493
overview over number of returns of given pulse: 249493 27232 848 0 0 0 0
histogram of classification of points:
           17553  unclassified (1)
          180868  ground (2)
           37030  high vegetation (5)
           42122  building (6)

Reply all
Reply to author
Forward
0 new messages