MelFed wrote:
> Hi Terje
> Thanks for your quick response.
> Unfortunately, I dont really understand your suggestion. I have some
> comments below.
I obviously failed to explain it properly. :-(
Here's a pseudo-code version:
(x0,y0,x1,y1) = getextent();
int area = abs((x1-x0)*(y1-y0));
int nrofpoints = getnumberofpoints();
int instances = (int) (nrofpoints/area); // How many points per sq meter?
lazinstance instance[instances]; // Initialize this many instances
int prevtime = -1;
int inst = -1;
foreach (points_in_laz_file) {
(x,y,z,r,n,t) = nextpoint();
if (t != prevtime) { // Switch to next instance!
inst++;
if (inst >= instances) inst = 0;
}
instance[inst].savepoint(x,y,z,r,n,t);
}
The result of this will be to split all pulses evenly (round robin)
across all instances, with an average point density of the specified 1
point per sq meter.
OK?
Terje
>
> On Monday, 11 July 2016 22:47:24 UTC+10, Terje Mathisen wrote:
>
> MelFed wrote:
> > Hi everyone,
> >
> > I am currently trying to write a workflow that takes me from a
> large
> > area, high density point cloud (norm_warra_rotated.laz) to a
> series of
> > grids (warragrids.zip) where each grid is used to make multiple
> > instances of the point cloud thinned to various point densities.
> So effectively you are trying to determine minimum pulse densities
> needed to do various level of classification/feature extraction?
>
> *In one instance I am trying to determine the minimum pulse densities
> to do different classifications but I dont just need one instance, I
> need as many as possible. This means that each version of the thinned
> point cloud needs to be different from the others. I dont seem to
> understand how your approach ensures that the thinned clouds are
> different.*
>
> >
> > The main issues I am having are:
> > 1) I want to thin the point cloud to a point density relative to
> area
> > (1 hit/m2), but would need to resample based on pulse (meaning
> that I
> > need to thin using the GPS time stamps). However, I cant seem to
> find
> > a work around that lets me select the point density based on area
> > using the GPS time stamp information.
>
> This means that with a point cloud with lots of returns for each
> pulse
> (I have a 40 points/sq meter collection myself which has up to 7
> returns
> for each pulse) you get larger flight/time distance between each
> pulse
> you keep, right?
>
>
> *I dont necessarily think that just because the pulse has multiple
> returns that the time distance between each pulse would be larger. I
> dont want to adjust the distance between each pulse, I just want a
> random selection of pulses at a set density, regardless of the
> distance between the points.*
>
> > 2) I need to make multiple instances of the thinned point cloud.
> For
> > example, I have an original lidar file that is 40 hits/m2, I
> want to
> > make 40 independent point clouds each with 1hit/m2. I need to
> make as
> > many independent point clouds as possible from the available data
> > (which varies based on site).
> This is in fact fairly easy to do:
>
> 1) Read in the LAZ tile, group them by GPS time while counting both
> number of pulses and number of returns.
>
> *I dont understand what you mean by "group" them by GPS time? I have
> them sorted by GPS time. Why does the number of returns matter if my
> base unit is pulses. I will not be separating points from the pulses
> during thinning.*
>
> 2) Use total_returns / area_in_square_meters to calculate number of
> separate instances.
>
> *I dont understand what the number of separate instances means? *
>
> 3) Distribute the groups from (1) across the instances from (2), this
> gives a near-optimal distribution of points to instances while making
> sure that all points from a given pulse will end up in the same
> instance.
>
> If the source tile is sorted in aquisition/gps time order then you
> should be able to just pick up the (2) info from the LAZ header,
> initialize all requires instances and then make a single pass over
> the
> collected points, switching to the next instance each time you get
> a new
> pulse.
>
>
> *I think I just dont understand the wording. Any extra explanation
> would be very helpful.*
> *Kind regards,*
> *Melissa*
> - <
Terje.M...@tmsw.no <javascript:>>