Hello from @rapidlasso,
here a follow-up to a recent post about the capability to convert from the ASCII formats PTS and PTX to LAZ and back without losing the additional information. The following example uses txt2las with option '-iptx' and las2las with option '-optx' to preserve the col and row information as well as the transformation vectors and matrices stored at the beginning of each PTX file:
more sample.ptx
2
3
4.151261 1.736411 -8.110131
-0.434947 -0.017233 -0.900291
-0.240839 0.965618 0.097871
0.867650 0.259394 -0.424143
-0.434947 -0.017233 -0.900291 0
-0.240839 0.965618 0.097871 0
0.867650 0.259394 -0.424143 0
4.151261 1.736411 -8.110131 1
4.146983 12.074142 1.134998 0.488502 76 74 91
4.147541 12.075727 1.136227 0.486915 76 74 91
4.147919 12.076833 1.137371 0.486976 76 74 91
4.148849 12.079544 1.138655 0.485328 76 74 91
4.146931 12.073991 1.139137 0.486076 76 74 91
4.148440 12.078399 1.140532 0.488441 79 76 93
txt2las -i sample.ptx -iptx ^
-set_scale 0.000001 0.000001 0.000001 ^
-iparse xyziRGB -olaz
las2las -i sample.laz ^
-optx -o sample_recovered.ptx
more sample_recovered.ptx
2
3
4.15126 1.73641 -8.11013
-0.434947 -0.017233 -0.900291
-0.240839 0.965618 0.097871
0.86765 0.259394 -0.424143
-0.434947 -0.017233 -0.900291 0
-0.240839 0.965618 0.097871 0
0.86765 0.259394 -0.424143 0
4.15126 1.73641 -8.11013 1
4.146983 12.074142 1.134998 0.488 76 74 91
4.147541 12.075727 1.136227 0.487 76 74 91
4.147919 12.076833 1.137371 0.487 76 74 91
4.148849 12.079544 1.138655 0.485 76 74 91
4.146931 12.073991 1.139137 0.486 76 74 91
4.148440 12.078399 1.140532 0.488 79 76 93
The first 10 lines of the PTX file contain special information that is parsed when txt2las is run with the '-iptx' switch and then stored as a VLR into the LAZ file. These first 10 lines can be recreated when this VLR is present by giving las2las with the '-optx' switch. Below you see how the PTX file contents are stored while it is a LAZ file.
The same VLR is produced when using pointzip.exe and pointunzip.exe from http://pointzip.org to do the PTX to and from LAZ conversion ...
Regards,
Martin @rapidlasso
PS: Generally I would suggest to use more appropriate scaling factors instead of preserving the non-existant micrometer resolution with '-set_scale 0.000001 0.000001 0.000001'
lasinfo -i sample.laz
lasinfo for sample.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.2
system identifier: 'LAStools (c) by rapidlasso GmbH'
generating software: 'txt2las (version 140609)'
file creation day/year: 165/2014
header size: 227
offset to point data: 553
number var. length records: 1
point data format: 2
point data record length: 26
number of point records: 6
number of points by return: 6 0 0 0 0
scale factor x y z: 0.000001 0.000001 0.000001
offset x y z: 0 10 0
min x y z: 4.146931 12.073991 1.134998
max x y z: 4.148849 12.079544 1.140532
variable length header record 1 of 1:
reserved 43707
user ID 'LAStools'
record ID 2001
length after header 272
description 'by LAStools of rapidlasso GmbH'
LASzip compression (version 2.2r0 c2 50000): POINT10 2 RGB12 2
reporting minimum and maximum for all LAS point record entries ...
X 4146931 4148849
Y 2073991 2079544
Z 1134998 1140532
intensity 1987 2000
return_number 1 1
number_of_returns 1 1
edge_of_flight_line 0 0
scan_direction_flag 0 0
classification 0 0
scan_angle_rank 0 0
user_data 0 0
point_source_ID 0 0
Color R 76 79
G 74 76
B 91 93
overview over number of returns of given pulse: 6 0 0 0 0 0 0
histogram of classification of points:
6 never classified (0)
PTX/PTS <-> LAZ/LAS (lossless)
Please post all open source software related items here, eg OpenScanTools
Post Reply
1 post
• Page 1 of 1
Post Reply
1 post
• Page 1 of 1
Return to “Open Source Software”
Jump to
- General
- ↳ Announcements
- ↳ Introductions
- ↳ Opinion Polls
- ↳ General Chat
- Affiliated Associations
- ↳ CMS Coordinate Metrology Society
- ↳ Press Releases
- ↳ Get Kids Into Survey
- ↳ IAFSM
- ↳ openpointcloudformats.org
- ↳ USIBD
- Terrestrial Scanners
- ↳ Amberg
- ↳ Press Releases
- ↳ FARO
- ↳ Press Release
- ↳ Tutorials & Webinars
- ↳ Leica Geosystems
- ↳ Press Releases
- ↳ Tutorials & Webinars
- ↳ Maptek
- ↳ Riegl
- ↳ Press Releases
- ↳ Tutorials & Webinars
- ↳ Surphaser
- ↳ Press Releases
- ↳ Topcon
- ↳ Press Releases
- ↳ Tutorials & Webinars
- ↳ Trimble
- ↳ Press Releases
- ↳ Tutorials & Webinars
- ↳ Z+F
- ↳ Press Releases
- ↳ Tutorials & Webinars
- Dynamic Mapping Solutions
- ↳ FARO Orbis
- ↳ GeoSLAM
- ↳ KAARTA
- ↳ Leica BLK2GO | BLK2GO PULSE | BLK2FLY
- ↳ NavVis
- ↳ Webinars
- ↳ Virtual Demos
- ↳ ViAmetris
- Structured Light Scanners
- ↳ Matterport
- ↳ Press Releases
- ↳ Tutorials & Webinars
- Handheld Scanners
- ↳ DotProduct
- ↳ Mantis Vision
- ↳ Polyga
- Laser Scanning Hire & Accessories
- ↳ G2 Survey
- ↳ Laser Scanning Europe
- Web Platform Solutions [SaaS]
- ↳ 3DUserNet
- ↳ ATIS.cloud
- ↳ Cintoo Cloud
- ↳ Press Releases
- ↳ Tutorials & Webinars
- ↳ GeoSignum Pointer
- ↳ JP Global Digital
- ↳ NavVis IVION
- ↳ Pointerra
- ↳ POINTLY
- ↳ Pointshare +
- ↳ PREVU3D
- ↳ Skand
- ↳ Press Releases
- ↳ Tutorials & Webinars
- ↳ Vercator
- ↳ Press Releases
- ↳ Tutorials & Webinars
- IOS & Android Scanner Application Software
- ↳ Dot3D
- ↳ R3D
- ↳ R3D Showcase | Gallery
- ↳ Beta Testing | Bugs & Suggestions
- ↳ Sitescape
- ↳ Zappcha
- Software Suites
- ↳ Autodesk ReCap Studio
- ↳ Atlas SCC
- ↳ AVEVA Suite
- ↳ ClearEdge3D
- ↳ Clouds2Max
- ↳ CloudCompare
- ↳ Elysium
- ↳ FARO As-Built
- ↳ FARO SCENE
- ↳ FARO BuildIT CONSTRUCTION
- ↳ Geomagic
- ↳ Inovx
- ↳ Kohera3D
- ↳ Leica Cyclone 3DR
- ↳ Leica Cyclone, Cyclone REGISTER 360 & Cyclone FIELD 360
- ↳ Maptek PointStudio
- ↳ MeshLab
- ↳ NUBIGON
- ↳ OpenScanTools
- ↳ pinpoint
- ↳ PointCab
- ↳ Pointfuse
- ↳ Press Releases
- ↳ Tutorials & Webinars
- ↳ Pointools
- ↳ PIX4D
- ↳ PolyWorks
- ↳ Pythagoras
- ↳ Rapidform
- ↳ Rhino3D
- ↳ RiScan Pro & RiSOLVE
- ↳ ScanSap
- ↳ SCAN TO BIM
- ↳ TOPCON MAGNET Collage
- ↳ TopoDOT
- ↳ Blogs and Tutorials
- ↳ Webinars
- ↳ Trimble Realworks
- ↳ Undet
- ↳ Veesus
- ↳ Z+F Laser Control
- Scanning Hardware
- ↳ Terrestrial Laser Scanners [TLS]
- ↳ Other Hardware: Field & Back Office
- ↳ Hand Held Scanners
- ↳ Mobile Scanners
- ↳ Structured Light Scanners
- ↳ Robotic Scanning Solutions
- ↳ Total Station Scanners
- ↳ Cavity Scanners
- ↳ Dynamic Mapping Scanners
- ↳ UAV Scanning Solutions
- Scanning Projects
- ↳ Request Help With Projects
- ↳ Show off Past Projects
- Scanning Software
- ↳ Registration Software
- ↳ CAD Software
- ↳ Modeling Software
- ↳ Web Based Software
- ↳ Third Party Software & Plugins
- ↳ Meshing Software
- ↳ Open Source Software
- ↳ Deformation Analysis Software
- ↳ Software Download Links
- ↳ AutoLisp, DIESEL, Dynamo, VBA, Python & .Net Tools
- Virtual | Augmented Reality Solutions
- ↳ VR Virtual Reality
- ↳ AR Augmented Reality
- Industry Sectors
- ↳ 3D Printing
- ↳ Aerial Lidar
- ↳ Aerospace Industry
- ↳ Archaeology & Heritage
- ↳ Automotive Industry
- ↳ Computer Graphics Industry (CGI)
- ↳ Construction & Architecture
- ↳ Forensics & CSI
- ↳ Oil & Gas Industry
- ↳ Building Information Modeling [BIM]
- ↳ Shipbuilding Industry
- ↳ Tunnel & Mining
- ↳ Mobile Scanning
- ↳ Right of Light
- ↳ Underwater Scanning
- Galleries
- ↳ Image Gallery
- ↳ Video Gallery
- ↳ 360० Panoramas
- Other Related Issues
- ↳ Future Technology
- ↳ Recruitment
- ↳ Advertising
- ↳ Report Stolen Kit
- ↳ Any Other Issues
- ↳ For Sale & Wanted Items
- Learning Resources
- ↳ Training Workshops & Online Tutorials
- ↳ Articles, Webinars & Links
- ↳ Exhibitions & Conferences
- ↳ Tips & Advice
- ↳ Education & Courses
- ↳ Product Comparison
- ↳ Bugs & Issues
- ↳ Forum Suggestions