[Liblas-devel] Creating LAS file, header coordinates doesn't set

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Liblas-devel] Creating LAS file, header coordinates doesn't set

Carlos Piury
Hi, I am trying to create a LAS file using the c++ API following the tutorial posted in the web page for c++. But when I use "lasinfo" tool for check the result I see the header "MAX X Y Z" and "MIN X Y Z" attribute with value "0" instead of the values with the point that I wrote.

## My code:

      liblas::Header header;
      liblas::Writer writer(ofs, header);
      liblas::Point point(&header);
      point.SetCoordinates(10, 20, 30);

      return 0;

## Lasinfo Output:

  Header Summary
  Min X Y Z:                   0 0 0
  Max X Y Z:                  0 0 0

  Minimum and Maximum Attributes (min,max)
  Min X, Y, Z:         10, 20, 30
  Max X, Y, Z:         10, 20, 30

I think (reading the lasinfo code) that lasinfo implementation uses an structure "Summary" and add each point readed to that structure, for this reason the values are right in the second output ("Minimum and Maximum attributes (min,max))". However I don't know if it's possible modify the header after a point is inserted, I tried it unsuccessfully :(.

Someone knows how to modify the header after the "liblas::Writer writer(ofs, header);" call or if the writer implementation must fix the header max and min?

Thanks ;).

Liblas-devel mailing list
[hidden email]