[GRASS-user] v.generalize and external boundaries
Hi List, I'm using v.generalize in a script (excerpt included below) to smooth the boundaries of a polygon vector dataset. In the attached example (input_vector.png), I would like to *only* generalize the internal lines (blue), and leave the external boundary (green line) unchanged. I thought that the flag, '-l' might provide this functionality, but unfortunately the resulting external boundary is changed significantly (attached vgeneralize_output.png). Is this functionality available in v.generalize or is there another way that this could be achieved in GRASS? Thanks in advance. Best regards, Daniel. ##run generalisation (step: 1 - douglas) gscript.run_command('v.generalize', flags='l', overwrite=True, input='segments', output='segments_douglas', method='douglas', threshold=1) ##run generalisation (step: 2 - sliding average) gscript.run_command('v.generalize', flags='l', overwrite=True, input='segments_douglas', output='segments_douglas_slide', method='sliding_averaging', threshold='2', look_ahead='9', slide='0.1', iterations='3') ##run generalisation (step: 3 - snake) gscript.run_command('v.generalize', flags='l', overwrite=True, input='segments_douglas_slide', output='segments_douglas_slide_snake', method='snake', threshold='3', alpha='1', beta='1') pEpkey.asc Description: application/pgp-keys ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Remove points from boundary
On Fri, 24 Aug 2018, Micha Silver wrote: If your set of points are ordered, you might want to have a look at the v.in.lines module. THen, assuming the set of points are indeed a closed boundary (the first and last points are equivalent) then v.type will convert the line to a boundary. Micha, Yes, the first and last points are the same. I'll look at v.in.lines and v.type to clean this up. Toda, Rich ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] New addon v.rast.bufferstats
Hi Stephan, That is very interesting, and I see interesting potential uses for that.Does it work for any type of input vector (points, polygons, lines)? I am willing to test it and give you feedback.Some time ago I helped a friend develop something alike, but (unfortunately) he was working on ArcGIS, so although the plugin is free, the main software is paid. We wanted to translate it into a free platform but we didn't have time to do that.The rationale is the same, but it performs statistics form vector layers instead - area, counts, etc.Take a look here:https://github.com/LEEClab/MSBuffer BestBernardo Em sexta-feira, 24 de agosto de 2018 04:02:18 BRT, Stefan Blumentrath escreveu: Hi Rich, My application for the module is characterizing sampling sites in ecological research. It is mainly a port of https://grass.osgeo.org/grass64/manuals/addons/v.what.rast.buffer.html to Python - with some enhancements like multiple buffers, DB output, tabulating classified raster data (e.g. land cover maps). The purpose is "to provide local environmental context to" a series of input geometries. As mentioned, the module is not incredibly fast, but might help to replace users/researcher time with CPU hours... So, what is appropriate, depends on how much data you throw at the module, your patience and how efficient your alternative workflows are... Would be cool if you could share your experience, in case you try it... Cheers Stefan -Original Message- From: grass-user On Behalf Of Rich Shepard Sent: torsdag 23. august 2018 23:20 To: grass-user grass-user (grass-user@lists.osgeo.org) Subject: Re: [GRASS-user] New addon v.rast.bufferstats On Thu, 23 Aug 2018, Stefan Blumentrath wrote: > I just uploaded a new addon "v.rast.bufferstats" that extracts > different raster statistics in multiple buffers around vector > geometries. It is looping over input geometries and thus not very > performant with lots of input geometries. But it can be convenient for > e.g. characterizing the surrounding of study sites... Stefan, This looks interesting. For what applications would it be appropriate? Regards, Rich ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Remove points from boundary
If your set of points are ordered, you might want to have a look at the v.in.lines module. THen, assuming the set of points are indeed a closed boundary (the first and last points are equivalent) then v.type will convert the line to a boundary. On 08/23/2018 07:45 PM, Rich Shepard wrote: Using v.in.ascii I imported a set of points then used the GUI vector map editor to join the points into an area boundary. How do I remove the points at each node so the boundary is a single line without point symbols (in this case, basic/x) displaying? TIA, Rich ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] New addon v.rast.bufferstats
Hi Rich, My application for the module is characterizing sampling sites in ecological research. It is mainly a port of https://grass.osgeo.org/grass64/manuals/addons/v.what.rast.buffer.html to Python - with some enhancements like multiple buffers, DB output, tabulating classified raster data (e.g. land cover maps). The purpose is "to provide local environmental context to" a series of input geometries. As mentioned, the module is not incredibly fast, but might help to replace users/researcher time with CPU hours... So, what is appropriate, depends on how much data you throw at the module, your patience and how efficient your alternative workflows are... Would be cool if you could share your experience, in case you try it... Cheers Stefan -Original Message- From: grass-user On Behalf Of Rich Shepard Sent: torsdag 23. august 2018 23:20 To: grass-user grass-user (grass-user@lists.osgeo.org) Subject: Re: [GRASS-user] New addon v.rast.bufferstats On Thu, 23 Aug 2018, Stefan Blumentrath wrote: > I just uploaded a new addon "v.rast.bufferstats" that extracts > different raster statistics in multiple buffers around vector > geometries. It is looping over input geometries and thus not very > performant with lots of input geometries. But it can be convenient for > e.g. characterizing the surrounding of study sites... Stefan, This looks interesting. For what applications would it be appropriate? Regards, Rich ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user