[Liblas-devel] Fwd: LibLas add rgb example not writing color

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Liblas-devel] Fwd: LibLas add rgb example not writing color

Pol Monsó Purtí

I've tested the lasexample_add_rgb.cpp and it seams to fail to color the las.

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


_______________________________________________
Liblas-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Liblas-devel] Fwd: LibLas add rgb example not writing color

Mateusz Loskot
On 7 March 2018 at 13:52, Pol Monsó Purtí <[hidden email]> wrote:
>
> 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


Since you are using LAStools, please post yoru question to forums
relevant to this projects, wherever those are.
This mailing list is dedicated to libLAS project.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Liblas-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Liblas-devel] Fwd: LibLas add rgb example not writing color

Pol Monsó Purtí
Will do, thanks! 

El dia 7 març 2018 14:20, "Mateusz Loskot" <[hidden email]> va escriure:
On 7 March 2018 at 13:52, Pol Monsó Purtí <[hidden email]> wrote:
>
> 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


Since you are using LAStools, please post yoru question to forums
relevant to this projects, wherever those are.
This mailing list is dedicated to libLAS project.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

_______________________________________________
Liblas-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/liblas-devel