[GRASS-user] mask "around" a linear feature

Hello!

We have a linear feature of ~60km which is a future path of a road having ~400m in size and being quite curved.

I’d like to create a mask for raster operations that fits this shape.

Hull creates a convex shape which is hice but still have many “empty” space involved. This is sparse lidar data, anyway.

Is there a techique to create such a raster mask/map?

Pure rasterization won’t work since it has holes (see also vectorized coverage at 10m resolution, zoomed into a “hole”.

I’d need something like a “concave hull” function :slight_smile:

thanks

Robert

Szövegközi kép 3Szövegközi kép 2

Hope about the addon:

(attachments)

kép.png
kép.png

···

On 07/19/2017 11:57 AM, Robert Kuszinger wrote:

Hello!

We have a linear feature of ~60km which is a future path of a road having ~400m in size and being quite curved.

I’d like to create a mask for raster operations that fits this shape.

Hull creates a convex shape which is hice but still have many “empty” space involved. This is sparse lidar data, anyway.

Is there a techique to create such a raster mask/map?

Pure rasterization won’t work since it has holes (see also vectorized coverage at 10m resolution, zoomed into a “hole”.

I’d need something like a “concave hull” function :slight_smile:

https://grasswiki.osgeo.org/wiki/AddOns/GRASS7/vector#v.concave.hull

thanks

Robert

Szövegközi kép 3Szövegközi kép 2

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)
-- 
Micha Silver
cell: +972-523-665918

Dear Micha,

thanks, really, I’ll check it. I totally forget to check the addons collection…

regards

Robert

(attachments)

kép.png
kép.png

···

2017-07-19 11:56 GMT+02:00 Micha Silver <tsvibar@gmail.com>:

On 07/19/2017 11:57 AM, Robert Kuszinger wrote:

Hello!

We have a linear feature of ~60km which is a future path of a road having ~400m in size and being quite curved.

I’d like to create a mask for raster operations that fits this shape.

Hull creates a convex shape which is hice but still have many “empty” space involved. This is sparse lidar data, anyway.

Is there a techique to create such a raster mask/map?

Pure rasterization won’t work since it has holes (see also vectorized coverage at 10m resolution, zoomed into a “hole”.

I’d need something like a “concave hull” function :slight_smile:

Hope about the addon:
https://grasswiki.osgeo.org/wiki/AddOns/GRASS7/vector#v.concave.hull

thanks

Robert

Szövegközi kép 3Szövegközi kép 2

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)
-- 
Micha Silver
cell: +972-523-665918

Dear Micha,

I realized that the addon is for vector, so I converted my raster (that's
what I have) to points but even when downsampled is was very slow, actually
(~480000 points), I was not able to wait for it.
So, I created a workaround for sparse huge point clouds loaded into a
raster map. The method is not exact, this is a kind of approximation (as
raster is, always).

We start from "startvocer", created with r.in.lidar in my case:

   Type of Map: raster Number of Categories: 0
   Data Type: FCELL
   Rows: *28222*

   Columns: * 79670 *

   Total Cells: *2248446740*

!kép.png|384x266

zoom:

!kép.png|357x211

final:

!kép.png|404x270!kép.png|464x196

The final vector map in my case is one vector area.... it could now be used
to set MASK for raster operations later on...

*PROCESS (resolution degradation and buffer size /100/ should be tailored
to application:*

g.region raster=startcover # original resolution is 1m
g.region res=10

r.resamp.stats --overwrite input=00001_rec4@kana output=00001_rec4_int
method=minimum

r.buffer --o input=00001_rec4_int output=lasmaskbuf distances=100
# let the "paint" flow to fill gaps and smooth edges
r.mapcalc --o
expression="lasmaskbuf2=if(isnull(lasmaskbuf),null(),1)" # make all
values 1 in the buffer to let r.to.vect create one area
r.to.vect -s --overwrite input=lasmaskbuf2 output=lasmaskbufvec
type=area # make vector of the buffer
v.generalize --overwrite input=lasmaskbufvec@kana type=area
output=lasmaskbufvecgeneralized method=sliding_averaging threshold=10000 #
make simpler
v.buffer --o input=lasmaskbufvecgeneralized@kana type=area output=final
distance=-100 # cut back

Best regards
Robert

2017-07-19 11:56 GMT+02:00 Micha Silver <tsvibar@gmail.com>:

On 07/19/2017 11:57 AM, Robert Kuszinger wrote:
Hope about the addon:
https://grasswiki.osgeo.org/wiki/AddOns/GRASS7/vector#v.concave.hull

--
Micha Silver
cell: +972-523-665918