[GRASS-user] Mask creation from sporadic data v.hull

Hi all,

For a while now I have been trying to make an accurate mask for LiDAR points.
As I am working with 1m resolution data I want the mask to be accurate (no
more than 1m around the edge of the points/flight area).

The data is wavy around the edges, due to a windy flight when the data was
collected, so v.hull ignores the waves and joins the crests, adding vast NULL
areas to the mask. Also, there are up to 10m holes within the individual
swaths.

r.in.xyz at 5m resolution has given me the best results so far as final
accuracy masks, but not for the processing as I want holes within the data
filled with v.surf.rst.

I have looked at v.delaunay and v.voronoi too, but both need topology built
and don't have similar outputs to v.hull regarding vast NULL areas. This is ok
for 1km tiles, but I want to process each swath separately (study on swath
accuracy) and these can be c.5million points each.

Does anyone know if there is way to do this accurately without manually
digitizing? Have I missed something in the book/manual?

Cheers

John

Hi,

I have solved this problem in the past with a combination of g.region,
v.to.rast, and r.grow.

For example, if you import your points in as a vector-- convert to
raster, increase the cell size, and grow out a couple of cells. If you
are bringing in your lidar data with r.in.xyz, then it is already a
raster, and you can adjust the resolution and "grow" accordingly. Make
sense?

Cheers,
Dylan

On Fri, Dec 18, 2009 at 4:04 AM, John Tate <john.tate@ntlworld.com> wrote:

Hi all,

For a while now I have been trying to make an accurate mask for LiDAR points.
As I am working with 1m resolution data I want the mask to be accurate (no
more than 1m around the edge of the points/flight area).

The data is wavy around the edges, due to a windy flight when the data was
collected, so v.hull ignores the waves and joins the crests, adding vast NULL
areas to the mask. Also, there are up to 10m holes within the individual
swaths.

r.in.xyz at 5m resolution has given me the best results so far as final
accuracy masks, but not for the processing as I want holes within the data
filled with v.surf.rst.

I have looked at v.delaunay and v.voronoi too, but both need topology built
and don't have similar outputs to v.hull regarding vast NULL areas. This is ok
for 1km tiles, but I want to process each swath separately (study on swath
accuracy) and these can be c.5million points each.

Does anyone know if there is way to do this accurately without manually
digitizing? Have I missed something in the book/manual?

Cheers

John

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Dylan,

Cheers for this.

I have been playing around with v.category and v.extract this afternoon to
create a boundary but not getting very far. I still have a lot to learn when
it comes to vectors and tables in GRASS.

I compared your method r.grow (had to be 4m to get rid of the holes in the
data) with r.in.xyz at 5m resolution (has to 5m to get rid of all holes) on a
sample area.

The r.in.xyz at 5m not only had a cleaner edge (no wavy edges around the ends
of the lidar lines) but seemed to be more accurate in general (less distance
away from points due to the location of the 5m cell grid).

There will still be some large holes in a few areas doing it this way. Guess
this will have to suffice for now. I want to try and keep the process simple so
that it can be automated without any visual interpretation to fill the large
holes with g.region, g.grow and then r.patch. Or digitising around the whole
swath.

Thanks for the response though, hadn't used r.grow before so good to learn
something new.

Cheers

John

On Friday 18 December 2009 16:09:09 Dylan Beaudette wrote:

Hi,

I have solved this problem in the past with a combination of g.region,
v.to.rast, and r.grow.

For example, if you import your points in as a vector-- convert to
raster, increase the cell size, and grow out a couple of cells. If you
are bringing in your lidar data with r.in.xyz, then it is already a
raster, and you can adjust the resolution and "grow" accordingly. Make
sense?

Cheers,
Dylan

On Fri, Dec 18, 2009 at 4:04 AM, John Tate <john.tate@ntlworld.com> wrote:
> Hi all,
>
> For a while now I have been trying to make an accurate mask for LiDAR
> points. As I am working with 1m resolution data I want the mask to be
> accurate (no more than 1m around the edge of the points/flight area).
>
> The data is wavy around the edges, due to a windy flight when the data
> was collected, so v.hull ignores the waves and joins the crests, adding
> vast NULL areas to the mask. Also, there are up to 10m holes within the
> individual swaths.
>
> r.in.xyz at 5m resolution has given me the best results so far as final
> accuracy masks, but not for the processing as I want holes within the
> data filled with v.surf.rst.
>
> I have looked at v.delaunay and v.voronoi too, but both need topology
> built and don't have similar outputs to v.hull regarding vast NULL areas.
> This is ok for 1km tiles, but I want to process each swath separately
> (study on swath accuracy) and these can be c.5million points each.
>
> Does anyone know if there is way to do this accurately without manually
> digitizing? Have I missed something in the book/manual?
>
> Cheers
>
> John
>
> _______________________________________________
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user

JT-2 wrote:

For a while now I have been trying to make an accurate mask for LiDAR
points.
As I am working with 1m resolution data I want the mask to be accurate (no
more than 1m around the edge of the points/flight area).

Awhile ago, inorder to solve this same problem, I hacked together a little
script [1] that basically does a morphological closing on a raster map, e.g.
the output of r.in.xyz. My shell scripting is pretty weak and I keep meaning
to clean up the script and convert it to Python but it meets my needs for
the moment so I keep finding better ways to spend my time. Maybe it will be
of some help.

Best,

[1] http://bitbucket.org/jedfrechette/jdflib/src/tip/grass/r.closing

--
Jed Frechette

University of New Mexico Lidar Lab
www.unm.edu/~lidar
--
View this message in context: http://n2.nabble.com/Mask-creation-from-sporadic-data-v-hull-tp4186191p4190321.html
Sent from the Grass - Users mailing list archive at Nabble.com.

John Tate wrote:

For a while now I have been trying to make an accurate mask
for LiDAR points.
As I am working with 1m resolution data I want the mask to
be accurate (no
more than 1m around the edge of the points/flight area).

The data is wavy around the edges, due to a windy flight
when the data was
collected, so v.hull ignores the waves and joins the
crests, adding vast NULL
areas to the mask. Also, there are up to 10m holes within
the individual
swaths.

r.in.xyz at 5m resolution has given me the best results so
far as final
accuracy masks, but not for the processing as I want holes
within the data
filled with v.surf.rst.

I have looked at v.delaunay and v.voronoi too, but both
need topology built
and don't have similar outputs to v.hull regarding vast
NULL areas. This is ok
for 1km tiles, but I want to process each swath separately
(study on swath
accuracy) and these can be c.5million points each.

Does anyone know if there is way to do this accurately
without manually
digitizing? Have I missed something in the book/manual?

sure, use r.in.xyz + r.buffer.

perhaps then shrink the area back to bounds by creating a r.mapcalc
inverse map and r.growing it a little. If you really want a vector area
coverage you could then do r.to.vect + v.dissolve to remove the interior
holes. Maybe you have to run v.centroids before v.dissolve to give the
holes cat numbers ?.

I expect that v.buffer would horribly hemorrhage given that many points.
(but it might be an interesting stress-test experiment to see what the
limits are :slight_smile:

Hamish