<div>All,</div><div><br></div>I wrote some python to  pipe las2txt to  GRASS&#39;s r.in.xyz on using subprocess which is what most of the GRASS python scripts use. Its not very sophisticated at all but seems to work decently well however I suspect Howard&#39;s point about it not being much better than the text file approach is true. Its based on the GRASS LIDAR wiki page(<a href="http://grass.osgeo.org/wiki/LIDAR">http://grass.osgeo.org/wiki/LIDAR</a>): Heres an example:<div>
<br></div><div>from liblas import file, header </div><div>import subprocess as sub</div><div>import grass.script as grass</div><div><br></div><div><div>def run(cmd, **kwargs):</div><div>    grass.run_command(cmd, quiet = True, **kwargs)</div>
<div><br></div><div>path=&#39;../data/las/ucd_01.las&#39;</div><div>dbname=&#39;ucd_01.las&#39;</div><div><div>h=file.File(path).header</div><div>run(&quot;g.region&quot;, e=h.max[0], w=h.min[0], s=h.min[1], n=h.max[1])</div>
<div>pts=sub.Popen(&#39;las2txt -i %s --parse xyz --delimiter &quot;|&quot; --keep-classes 2 --stdout&#39;%path, shell=True, stdout=sub.PIPE)</div><div>mkInRast=grass.feed_command(&quot;r.in.xyz&quot;, input=&quot;-&quot;, output=dbname, method=&#39;mean&#39;)</div>
<div>mkInRast.stdin.write(pts.communicate()[0])</div><div>mkInRast.stdin.close()</div><div>mkInRast.wait()</div><div><br></div><div>#this stuff is based on the wiki page for interpolating/filtering the resulting GRASS dataset</div>
<div><br></div><div>run(&quot;r.to.vect&quot;, flags=&#39;z&#39;, input=dbname, output=dbname+&#39;_pt&#39;, feature=&#39;point&#39;)    </div><div>run(&quot;v.surf.rst&quot;, layer=&#39;0&#39;, input=dbname+&#39;_pt&#39;, elev= dbname+&#39;_rst&#39;)</div>
<div>run(&quot;g.remove&quot;, vect=&#39;%s_pt&#39;%dbname)</div><div>run(&quot;g.remove&quot;, rast=dbname)</div></div><div><br></div><div>Best,</div><div><br></div><div>Peter</div><div><br></div><br><div class="gmail_quote">
On Fri, Mar 4, 2011 at 11:10 AM, Howard Butler <span dir="ltr">&lt;<a href="mailto:hobu.inc@gmail.com">hobu.inc@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Mar 4, 2011, at 12:24 PM, Stuart Edwards wrote:<br>
<br>
&gt;<br>
&gt; On Mar 4, 2011, at 9:27 AM, Howard Butler wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mar 4, 2011, at 8:29 AM, francesco wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; I use GRASS quite a lot, but always thought that it would be slow on vector points. I know Brovelli and her team developed some modules, I&#39;ll check on that. Good idea to use LibLAS as &quot;driver&quot; to turn LAS to xyz.<br>

&gt;&gt;<br>
&gt;&gt; It would be much, much, much faster if someone wrote some glue between libLAS and GRASS (proposed here quite a while ago, but still not done &lt;<a href="http://lists.osgeo.org/pipermail/grass-dev/2008-May/037687.html" target="_blank">http://lists.osgeo.org/pipermail/grass-dev/2008-May/037687.html</a>&gt;).  I would guess it would be an order of magnitude faster to ingest data if you didn&#39;t have to go through text formats to do it.<br>

&gt;<br>
&gt; This may be possible since Liblas has a las2ogr tool and GRASS uses ogr for vector input - seems there&#39;s an opportunity to script output from the former and pipe it as  input to v.in.ogr ?  Beyond my skills unfortunately ....<br>

<br>
</div>that&#39;s not really much better.  What needs to happen is for someone to write some code in GRASS that utilizes libLAS directly.  Surely a manpower/desire thing.<br>
<font color="#888888"><br>
Howard_______________________________________________<br>
</font><div><div></div><div class="h5">Liblas-devel mailing list<br>
<a href="mailto:Liblas-devel@lists.osgeo.org">Liblas-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/liblas-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/liblas-devel</a><br>
</div></div></blockquote></div><br></div>