[Liblas-devel] Creating LAS file, header coordinates doesn't set
Carlos Piury
dgpiury at gmail.com
Thu Jan 8 04:09:55 PST 2015
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:
main()
{
......
liblas::Header header;
liblas::Writer writer(ofs, header);
liblas::Point point(&header);
point.SetCoordinates(10, 20, 30);
writer.WritePoint(point);
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 ;).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/liblas-devel/attachments/20150108/144b56a7/attachment.html>
More information about the Liblas-devel
mailing list