Re: [GRASS-user] r.forestfrag AddOn
Hi Maning, > In the script there is an option to slect a windows size: > > #%option > #% key: window > #% type: integer > #% description: window size default is 5 > #% answer : 5 > #% required : yes > #%END > > You can modify the r.neighbors section like this: > > r.neighbors input=A output=C method=sum size=$GIS_OPT_window --o > r.neighbors input=B output=D method=sum size= $GIS_OPT_window --o ok, so with that I have control on the window size from r.neighbours. That's already something. This applies well for the calculation of pf. However, for the calculation of pff I cannot use r.neighbours, because it does not provide for counting pixel-pairs or other more complex functions for neighbourhood relations. I had to put that into a separate r.mapcalc expression, here e.g. to calculate the number of 'forest-forest' pairs in a 3x3 window: x--x--x | | | x--0--x | | | x--x--x r.mapcalc "F=((A[ 1,-1]*A[ 1, 0])+(A[ 1, 0]*A[ 1, 1])+ # upper row horizontal pairs (A[ 0,-1]*A[ 0, 0])+(A[ 0, 0]*A[ 0, 1])+ # midrow horizontal pairs (A[-1,-1]*A[-1, 0])+(A[-1, 0]*A[-1, 1])+ # lower row horizontal pairs (A[ 1,-1]*A[ 0,-1])+(A[ 0,-1]*A[-1,-1])+ # left column vertical pairs (A[ 1, 0]*A[ 0, 0])+(A[ 0, 0]*A[-1, 0])+ # mid column vertical pairs (A[ 1, 1]*A[ 0, 1])+(A[ 0, 1]*A[-1, 1]))" # right column vertical pairs Now I need to find out how the window size could be fitted according to an input value (e.g. 3 for 3x3, 9 for 9x9 etc.) for this r.mapcalc expression. Only alternative is that the user adjusts the window size manually by adding the respective cell-pairs to the r.mapcalc expression. E.g. for a 5x5 moving window this would look like: x--x--x--x--x | | | | | x--x--x--x--x | | | | | x--x--0--x--x | | | | | x--x--x--x--x | | | | | x--x--x--x--x r.mapcalc "F=((A[ 2,-2]*A[ 2,-1])+(A[ 2,-1]*A[ 2, 0])+(A[ 2, 0]*A[ 2, 1])+(A[ 2, 1]*A[ 2, 2])+ # upper row horizontal pairs ... (A[ 2,-2]*A[ 1,-2])+(A[ 1,-2]*A[ 0, -2])+(A[ 0,-2]*A[-1,-2])+(A[-1,-2]*A[ -2,-2])+ # left column vertical pairs ... Any ideas how to generate a general description for window-sizes with this r.mapcalc expression? Stefan Quoting maning sambale : > Dear Stefan, > > If i remember it right, the window size is an input to the > r.neighbors command. > In the script there is an option to slect a windows size: > > #%option > #% key: window > #% type: integer > #% description: window size default is 5 > #% answer : 5 > #% required : yes > #%END > > You can modify the r.neighbors section like this: > > r.neighbors input=A output=C method=sum size=$GIS_OPT_window --o > r.neighbors input=B output=D method=sum size= $GIS_OPT_window --o > > On Sun, Feb 26, 2012 at 5:51 PM, Stefan Sylla wrote: >> By now, the script can only calculate the forest fraction for a 3x3 window. >> Any ideas on how to automatically generate different window-sizes would be >> welcome. > > > > -- > cheers, > maning > -- > "Freedom is still the most radical idea of all" -N.Branden > wiki: http://esambale.wikispaces.com/ > blog: http://epsg4253.wordpress.com/ > -- > -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Re-GRASS-user-r-forestfrag-AddOn-tp4557482p4557482.html Sent from the Grass - Users mailing list archive at Nabble.com.___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Possible bug in r.sum and in r.stats?
Rainer M Krug wrote: > I get the following output as seen on the screenshot. In future, please copy/paste the text rather than using a screenshot. > Look at the number of cells in r.stats, compared to total cells as > given by r.info (which is correct). > > Any ideas what is happening? Does the current region match the raster? r.info displays statistics for the underlying raster; the data which r.stats uses is resampled and cropped/padded according to the current region. -- Glynn Clements ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] identify valleys from DEM
Hello!I am looking for a way to identify valleys that have at least a depth of 50m and a width of 100m from DEM Data. A visual method woul be to draw different profile transects but I would prefer a more automatical method. For the depth of a valley I could use the watershed analyses and subtract the DEM-Height of a river basin from the DEM-Height of its watershed-area which results in the height-difference.But I have no idea how to analyze if the valley has a width of at least 100 meters.Can somebody give me a hint?Thanks,Kerstin Ihr WEB.D E Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android. https://produkte.web.de/freemail_mobile_startseite/ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] wxdigit preferences
Hi, 2012/3/7 Vincent Bain : > Yep ! it works (tested on devbr6). > will it be possible to port it soon to 6.4 release branch ? thanks for testing, done in r51017. Martin -- Martin Landa * http://geo.fsv.cvut.cz/~landa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] wxdigit preferences
Yep ! it works (tested on devbr6). will it be possible to port it soon to 6.4 release branch ? Thank you so much Martin for your promptness, Vincent. Le mercredi 07 mars 2012 à 11:57 +0100, Martin Landa a écrit : > Hi, > > 2012/3/7 Vincent Bain : > > for digitizing convenience, I would like to change the default color of > > currently digitized line/boundary. The default is red (dashed for > > current segment) and this feature is not accessible via the digitizing > > settings menu. > > could you try r50999 (trunk) or r51000 (devbr6)? > > vdigit settings -> symbology -> digitize new line segment (digitizer > new line/boundary) > > Martin > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] grass_addons Integration in GRASS GIS
Hi, 2012/3/7 Ripsime Khachatryan : > I would like to add grass_addons to GRASS, and use it in my code, how can I > accomplish it ? try `g.extension` [1] from 6.4.2+. Note that for installing addons on Windows only one way is to use wxGUI (Settings -> Install extension from addons). Martin [1] http://grass.osgeo.org/grass64/manuals/html64_user/g.extension.html -- Martin Landa * http://geo.fsv.cvut.cz/~landa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] wxdigit preferences
Hi, 2012/3/7 Vincent Bain : > for digitizing convenience, I would like to change the default color of > currently digitized line/boundary. The default is red (dashed for > current segment) and this feature is not accessible via the digitizing > settings menu. could you try r50999 (trunk) or r51000 (devbr6)? vdigit settings -> symbology -> digitize new line segment (digitizer new line/boundary) Martin -- Martin Landa * http://geo.fsv.cvut.cz/~landa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] wxdigit preferences
Hello, for digitizing convenience, I would like to change the default color of currently digitized line/boundary. The default is red (dashed for current segment) and this feature is not accessible via the digitizing settings menu. I am wondering where this color setting is stored, then if it is possible to switch it directly in the source code. Ok, this is a trivial concern but there might exist a quite straight answer ;-) Thanks, Vincent ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user