Re: [GRASS-user] Local Relief Model tool
Eric: To install in a linux environment, I followed the instructions at http://grasswiki.osgeo.org/wiki/GRASS_and_Python#Testing_and_installing_Python_extensions. I haven't been able to find solid information on how users who don't compile themselves can install an addon that isn't available via g.extension. In general it's quite simple, users maintain a directory with all of their executable scripts in it and before starting GRASS add export GRASS_ADDON_PATH=/path/to/files to their ~/.bashrc. (~/.grass.bashrc is no good, the variable has to be set before grass starts) Then it magically finds them. The g.extension module(s) just fits itself into that and creates you an addon dir if one wasn't already set. For scripts there is no other install or compiling needed, just put it in a dir somewhere which is in the $PATH. Python might be a problem, but if you just call your module by its full name it should be ok (so with or without .py, just be sure to match the exact filename). There is http://grasswiki.osgeo.org/wiki/Compile_and_Install#Scripts, but I'm not sure how that applies to Windows users. Any advice in this area would be much appreciated. The GRASS 6 make system is still missing build support for python scripts (often it tries to reuse the shell Script.make, which mostly works on Linux). Smooth building with correct .bat file wrappers on Windows remains an issue. It can be done, I've seen it work, but still needs a new PythonScript.make to work smoothly. (similarly user- created personal shell scripts for GRASS 7 should have a ShellScript.make to help folks who need that, even if there are none in the main release.) regards, Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Local Relief Model tool
On Thu, Sep 26, 2013 at 12:54 AM, Hamish hamis...@yahoo.com wrote: Vaclav wrote: Hi Eric, actually I was working on the same module (named r.local.relief), so we have some duplication now. It is also based on [Hesse2010]. I was about to commit it to GRASS Addons but I need to write documentation first. For now, I'm adding the Python script into a attachment. I've quickly tested both and they give slightly different results. The other visible difference is the contours-to-really_smooth_elevation step. Hi, could you discuss the advantage of the local relief method? I take it that the idea is to remove the background signal to highlight local detail? v.surf.rst or v.surf.bspline with a really big search window and loose tension might also be good for a smoothed backgroundto subtract away, and see also recent discussion about trying to get planar trend surfaces out of r.cog addon on the grass-dev ML (a work in progress). Should fine relief be removed as well? (so gate filter and not just a low or high pass one) It seems to me that the contouring step is needlessly lossy and artifact prone, and that you might get better results using the r.surf.contour module to recreate a raster from the contour lines. Or perhaps better use a {v,r}.random sampling technique as input to one of the v.surf spline modules or r.surf.nnbathy -- less artifacts than interpolating from contour lines. Also note that the contour method will flatten off the tops of features which are smaller than your contour step level. (so choice of contour step size becomes very important) The thought behind the contouring step is that when you apply a low pass filter and subtract it from the DEM, the large scale features (based on the selected kernel size) are eliminated and the small-scale features are smoothed, resulting in bias toward small features and an underestimation of the magnitude of the local relief elevations as the spatial extent of the feature increases. By getting the 0-meter contours, converting them to points, and getting the elevations of the original DEM for those points, you're basically able to cut the large-scale features out of the original DEM, leaving the local relief behind without smoothing. See also http://grasswiki.osgeo.org/wiki/Contour_lines_to_DEM for an analysis and comparison of interpolation methods for creating surfaces from contour lines. (spoiler: the designed for the task r.surf.contour wins) regards, Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Local Relief Model tool
Hi all, I've created a grass python script that generates a local relief model (LRM) from a high-resolution (such as from LIDAR) DEM based on Hesse, Ralf (2010): LiDAR-derived Local Relief Models - a new tool for archaeological prospection. Archaeological Prospection 17:67-72. I've tested it on several data sets of mine and it seems to be working fine, however my data is limited to prehistoric Native American mounds. If anyone else has some data they can test the tool on and report on the results it would be much appreciated. The tool can be downloaded from https://github.com/egoddard/r.surf.lrm. To install in a linux environment, I followed the instructions at http://grasswiki.osgeo.org/wiki/GRASS_and_Python#Testing_and_installing_Python_extensions. I haven't been able to find solid information on how users who don't compile themselves can install an addon that isn't available via g.extension. There is http://grasswiki.osgeo.org/wiki/Compile_and_Install#Scripts, but I'm not sure how that applies to Windows users. Any advice in this area would be much appreciated. As a final note, I adapted this tool based on Rebecca Bennett's bash script that was published in her dissertation. Thank you, Rebecca, for answering all of my questions and for your efforts in trying to test it out :) Eric ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Local Relief Model tool
Hi Eric, actually I was working on the same module (named r.local.relief), so we have some duplication now. It is also based on [Hesse2010]. I was about to commit it to GRASS Addons but I need to write documentation first. For now, I'm adding the Python script into a attachment. I've quickly tested both and they give slightly different results. The other visible difference is the contours-to-really_smooth_elevation step. It seems that usage of r.fillnuls is faster than v.surfs. But this might require more testing as well as the different results do (probably caused by different elevation reconstruction). We can talk about it off-list if you prefer or at least on grass-dev list. And of course, we should discuss some merge of our scripts. As a side note I want also mention [r.shaded.pca] which I haven't announced yet but which is already in addons. It is based on [Devereux2010]. Best, Vaclav [Hesse2010] Hesse, Ralf (2010): LiDAR-derived Local Relief Models - a new tool for archaeological prospection. Archaeological Prospection 17:67-72. [Devereux2008] Devereux, B. J., Amable, G. S., Crow, P. P. (2008). Visualisation of LiDAR terrain models for archaeological feature detection. Antiquity, 82(316), 470-479. [r.shaded.pca] https://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.shaded.pca On Wed, Sep 25, 2013 at 10:50 PM, Eric Goddard egoddard1...@gmail.comwrote: Hi all, I've created a grass python script that generates a local relief model (LRM) from a high-resolution (such as from LIDAR) DEM based on Hesse, Ralf (2010): LiDAR-derived Local Relief Models - a new tool for archaeological prospection. Archaeological Prospection 17:67-72. I've tested it on several data sets of mine and it seems to be working fine, however my data is limited to prehistoric Native American mounds. If anyone else has some data they can test the tool on and report on the results it would be much appreciated. The tool can be downloaded from https://github.com/egoddard/r.surf.lrm. To install in a linux environment, I followed the instructions at http://grasswiki.osgeo.org/wiki/GRASS_and_Python#Testing_and_installing_Python_extensions. I haven't been able to find solid information on how users who don't compile themselves can install an addon that isn't available via g.extension. There is http://grasswiki.osgeo.org/wiki/Compile_and_Install#Scripts, but I'm not sure how that applies to Windows users. Any advice in this area would be much appreciated. As a final note, I adapted this tool based on Rebecca Bennett's bash script that was published in her dissertation. Thank you, Rebecca, for answering all of my questions and for your efforts in trying to test it out :) Eric ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user r.local.relief.py Description: Binary data ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user