[GRASS-user] mask "around" a linear feature
Robert Kuszinger
kuszinger at giscom.hu
Wed Jul 19 05:11:44 PDT 2017
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*
[image: Szövegközi kép 2]
zoom:
[image: Szövegközi kép 3]
final:
[image: Szövegközi kép 5][image: Szövegközi kép 4]
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 at 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 at kana type=area
output=lasmaskbufvecgeneralized method=sliding_averaging threshold=10000 #
make simpler
v.buffer --o input=lasmaskbufvecgeneralized at kana type=area output=final
distance=-100 # cut back
Best regards
Robert
>
> 2017-07-19 11:56 GMT+02:00 Micha Silver <tsvibar at 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170719/853982c2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kép.png
Type: image/png
Size: 25777 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170719/853982c2/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kép.png
Type: image/png
Size: 9706 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170719/853982c2/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kép.png
Type: image/png
Size: 33657 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170719/853982c2/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kép.png
Type: image/png
Size: 6276 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170719/853982c2/attachment-0007.png>
More information about the grass-user
mailing list