<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>They should. I didn't really make any changes to the calculations, I just rearranged the code to make it more processor and compiler friendly.<br><br><div>~Seth</div><div><br></div><div><br></div>via<span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "> iPhone</span></div><div><br>On Feb 9, 2013, at 3:27 PM, "Newcomb, Doug" <<a href="mailto:doug_newcomb@fws.gov">doug_newcomb@fws.gov</a>> wrote:<br><br></div><blockquote type="cite"><div>Seth,<div>I finally got a chance to patch your enhancements from the GRASS 70 svn code I pulled last night.</div><div><br></div><div>I compiled with these options:</div><div><div>./configure --with-gdal  --with-freetype --with-freetype-includes=/usr/include/freetype2 --with-proj   --with-sqlite --enable-largefile --with-cxx --enable-64bit  --with-python  --with-blas --with-lapack  --with-cairo  --with-wxwidgets --with-spatialite --with-tcltk --with-tcltk-includes=/usr/include/tcl8.4 --with-liblas=/usr/local/bin/liblas-config --enable-largefile --with-openmp --with-readline</div>

</div><div><br></div><div>The computer uses an AMD Vishera 8 core cpu with 8GB DDR3 1333 RAM  ( freshly updated home machine)</div><div><br></div><div><br></div><div>I used this 23 million cell raster of 20ft bare earth elevation in the mountains of western North Carolina.</div>

<div><br></div><div><br></div><div><div> Layer:    nc_1@PERMANENT                 Date: Thu Jul  5 20:56:51 2012    |</div><div> | Mapset:   PERMANENT                      Login of Creator: dnewcomb        |</div><div> | Location: ncstpft                                                          |</div>

<div> | DataBase: /data1/grass7                                                    |</div><div> | Title:    bilinear interpolation with Tykhonov regularization ( nc_1 )     |</div><div> | Timestamp: none                                                            |</div>

<div> |----------------------------------------------------------------------------|</div><div> |                                                                            |</div><div> |   Type of Map:  raster               Number of Categories: 7000            |</div>

<div> |   Data Type:    DCELL                                                      |</div><div> |   Rows:         5328                                                       |</div><div> |   Columns:      4375                                                       |</div>

<div> |   Total Cells:  23310000                                                   |</div><div> |        Projection: Lambert Conformal Conic                                 |</div><div> |            N:     593000    S:     486439   Res: 20.00018769               |</div>

<div> |            E:     492500    W:     405000   Res:    20                     |</div><div> |   Range of data:    min = -8269.7102472716  max = 6999.76272107517         |</div><div> |                                                                            |</div>

<div> |   Data Description:                                                        |</div><div> |    generated by v.surf.bspline                                             |</div><div> |                                                                            |</div>

<div> |   Comments:                                                                |</div><div> |    v.surf.bspline -z input="nc_1@PERMANENT" raster="nc_1" sie=40 sin=40\   |</div><div> |     method="bilinear" lambda_i=0.01 layer="1" solver="cholesky" maxit=1\   |</div>

<div> |    00 error=0.000001 memory=300                                            |</div><div> |                                                                            |</div><div> +----------------------------------------------------------------------------+</div>

</div><div><br></div><div><br></div><div>First, with the default GRASS 7 svn pull from 2/9</div><div><br></div><div><div>GRASS 7.0.svn (ncstpft):~ > time r.horizon -d elevin=nc_1 horizonstep=90 horizon=test_normal</div>

<div>Calculating map 1 of 4 (angle 0.00, raster map <test_normal_0>)</div><div> 100%</div><div>Calculating map 2 of 4 (angle 90.00, raster map <test_normal_1>)</div><div> 100%</div><div>Calculating map 3 of 4 (angle 180.00, raster map <test_normal_2>)</div>

<div> 100%</div><div>Calculating map 4 of 4 (angle 270.00, raster map <test_normal_3>)</div><div> 100%</div><div><br></div><div>real<span class="Apple-tab-span" style="white-space:pre"> </span>16m14.028s</div><div>
user<span class="Apple-tab-span" style="white-space:pre">     </span>16m11.993s</div>
<div>sys<span class="Apple-tab-span" style="white-space:pre">   </span>0m1.860s</div></div><div><br></div><div><br></div><div>Second, patching r.horizon main.c with the diff file from your patch.</div><div><br></div><div><div>

GRASS 7.0.svn (ncstpft):~ > time r.horizon -d elevin=nc_1 horizonstep=90 horizon=test_price</div><div>Calculating map 1 of 4 (angle 0.00, raster map <test_price_0>)</div><div> 100%</div><div>Calculating map 2 of 4 (angle 90.00, raster map <test_price_1>)</div>

<div> 100%</div><div>Calculating map 3 of 4 (angle 180.00, raster map <test_price_2>)</div><div> 100%</div><div>Calculating map 4 of 4 (angle 270.00, raster map <test_price_3>)</div><div> 100%</div><div><br></div>

<div>real<span class="Apple-tab-span" style="white-space:pre">  </span>14m22.607s</div><div>user<span class="Apple-tab-span" style="white-space:pre">       </span>14m20.582s</div><div>sys<span class="Apple-tab-span" style="white-space:pre">        </span>0m1.836s</div>

</div><div><br></div><div>Using r.mapcal to subtract the normal r.horizon calculation from the modified calculation shows 0 difference between the two results</div><div><br></div><div>I usually run r.horizon on a 755 million cell grid and do 24 horizons, I am assuming the the benefits would scale proportionally?</div>

<div><br></div><div><br></div><div>Doug</div><div> </div><div><br><br><div class="gmail_quote">On Mon, Feb 4, 2013 at 12:40 PM, Seth Price <span dir="ltr"><<a href="mailto:seth@pricepages.org" target="_blank">seth@pricepages.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>A while ago I made some simple, but significant, enhancements and submitted them to trac. They haven't been picked up, so I wanted to point them out so someone can commit them before they diverge from the trunk.</div>

<div><br></div><div><span style="font-family:'.HelveticaNeueUI';font-size:15px;line-height:19px;white-space:nowrap"><a href="http://trac.osgeo.org/grass/ticket/1624" target="_blank">http://trac.osgeo.org/grass/ticket/1624</a></span></div>

<div><span style="font-family:'.HelveticaNeueUI';font-size:15px;line-height:19px;white-space:nowrap"><br></span></div><div><span style="font-family:'.HelveticaNeueUI';font-size:15px;line-height:19px;white-space:nowrap">This has had some activity recently, but it's status is still "new" and it isn't in trunk.</span></div>

<div><span style="font-family:'.HelveticaNeueUI';font-size:15px;line-height:19px;white-space:nowrap"><br></span></div><div><span style="font-family:'.HelveticaNeueUI';font-size:15px;line-height:19px;white-space:nowrap"><a href="http://trac.osgeo.org/grass/ticket/1575" target="_blank">http://trac.osgeo.org/grass/ticket/1575</a></span></div>

<div><font face=".HelveticaNeueUI"><span style="font-size:15px;line-height:19px;white-space:nowrap"><br></span></font><div>~Seth</div><div><br></div><div><br></div><span>via</span><span> iPhone</span></div></div><br>_______________________________________________<br>


grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Doug Newcomb</div><div>

USFWS</div><div>Raleigh, NC</div><div>919-856-4520 ext. 14 <a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a></div><div>---------------------------------------------------------------------------------------------------------</div>

<div>The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.   Life is too short for undocumented, proprietary data formats.</div>


</div>
</div></blockquote></body></html>