[Liblas-devel] Point limit in the software

Neil Woodhouse Neil.Woodhouse at erdas.com
Mon Feb 23 13:36:54 EST 2009


Howard,

	Could you see any issue in not writing the header until the end?
What the code is doing right now is just adding points to the LAS file
and before closing writing the header. In this way I can accumulate the
bounds of the data and commit it then. Thinking about it this seems a
bit odd because one should write the header at the start :). 

	I figured that the number of points should not be a problem
because the tools on Isenberg's site work well with the data. It takes a
while to get the data out though. I did this so that I could discount
the viewer which seems stable, but the data has a lot of points in it.

	I am trying out a few things currently. Do you think it wise to
treat the LAS file as an append operation and update the header after
each block that is being processed? I am looking into logging the error
information from the processing which may give me some clues as to what
the issue may be.


Neil

-----Original Message-----
From: Howard Butler [mailto:hobu.inc at gmail.com] 
Sent: Monday, February 23, 2009 1:11 PM
To: Neil Woodhouse
Cc: liblas-devel at lists.osgeo.org
Subject: Re: [Liblas-devel] Point limit in the software


On Feb 23, 2009, at 5:09 AM, Neil Woodhouse wrote:

> Hi,
>
> 	I am using the libLAS software extensively and have came up with
> an oddity.


> If the file is created with over 450 million points the file
> cannot be read by the PointVue viewer

I have check through the code and it looks like we are using uint32_t  
(unsigned long) throughout the code to describe the number of points  
in the file (this is in lasheader.hpp/cpp).  This is what the spec  
said to use, so I don't think we have a problem there.

> so I
> used the LAS tools to create the file from the XYZ file. It works.

the LAS tools that come with libLAS, or Martin Isenberg's tools?

> I do
> not know the number of points that I am writing until the very end of
> the processing and I write the header at this point.

It would be helpful to see some code.  The LASWriter keeps track of  
how many points it is writing into the file as it writes them, and  
there is a function called UpdateHeader that is supposed to take care  
of writing the number of points in the file for you when the  
LASWriter's destructor is called.  You shouldn't have to manually keep  
track of the point count, and if you were doing that plus  
inadvertently clipping off precision by not using unsigned long, this  
might be the problem.  We would need to see some example code though.

http://liblas.org/browser/trunk/src/detail/writer10.cpp#L218

I wouldn't rule out that this isn't libLAS' problem though, as I've  
never attempted to write that many points with libLAS before (my quick  
python example to test writing 425 million points is still grinding as  
we speak ;).

Thanks for using libLAS, we hope it is working well for you.

Howard



More information about the Liblas-devel mailing list