[Liblas-devel] Fwd: LibLas add rgb example not writing color
Pol Monsó PurtÃ
lluna.nova at gmail.com
Wed Mar 7 04:52:35 PST 2018
I've tested the lasexample_add_rgb.cpp and it seams to fail to color the
las.
https://github.com/LAStools/LAStools/blob/master/LASlib/
example/lasexample_add_rgb.cpp
I'm using the test.laz here https://github.com/LAStools/
LAStools/blob/master/data/test.laz
I added
//re-test
LASreadOpener lasreadopener2;
lasreadopener2.set_file_name(lasreadopener.get_file_name());
lasreader = lasreadopener2.open();
for(int i = 0; i < 5 && lasreader->read_point(); i++)
{
LASpoint *p = &lasreader->point;
std::cout << "Color: ";
for(int c = 0; c < 4; c++)
std::cout << p->rgb[c] << " ";
std::cout << std::endl;
}
lasreader->close();
delete lasreader;
At the end to test right away and I get Color: 0 0 0 0
Same if I open the laz in CloudCompare. It identifies correctly as a rgb
las cloud (type 3) but the color is empty.
To be fair I'm still using the laslib repository version of Sept.2016, but
I think I never got the example to work and I found another way to do what
I wanted at the time.
I also have the same issue if I run las2las from LAStools
..\LAStools\bin\las2las -i my.laz -o myc.laz -set_RGB 100 0 0 -point_type 3
Am I the only one having this issue? Any hints on what might be causing
this?
Cheers,
Pol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/liblas-devel/attachments/20180307/fd01ef71/attachment.html>
More information about the Liblas-devel
mailing list