필터 지우기
필터 지우기

Problems with readPointCloud function

조회 수: 12 (최근 30일)
Pierluigi Amodio
Pierluigi Amodio 2022년 2월 15일
답변: Helge Nysæter 2022년 5월 12일
I have used the following functions to read data from a las file
lasReader = lasFileReader('DataCloud.las');
ptCloud = readPointCloud(lasReader);
The obtained pointCloud object has ptCloud.Location stored in single precision even if it also accepts values in double precision. Since for my data it is quite important to have double precision locations (and I am sure that in my las file locations are in double precision), it is possible to suggest to readPointCloud to save locations in double precision?
Thanks a lot for your help
  댓글 수: 1
Helge Nysæter
Helge Nysæter 2022년 5월 11일
I have the same problem. The decimals in the UTM-north-values are lost, and only one remains for the eastings. I then tried to move the origin with pctransform() before retrieving the coordinates from the Location-property. This resulted in more decimals for the eastings, but only one decimal for the northings.

댓글을 달려면 로그인하십시오.

답변 (1개)

Helge Nysæter
Helge Nysæter 2022년 5월 12일
Read utm-coordinates from one .las-file, shift origin, and then write to a new .las-file
pkt = lasdata('kd_1.las')
origoX = floor(min(pkt.x))
origoY = floor(min(pkt.y))
pkt.x = pkt.x-origoX
pkt.y = pkt.y-origoY
pkt.z = pkt.z
write_las(pkt,'kd_2.las')

카테고리

Help CenterFile Exchange에서 I/O에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by