<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Gianni,<div><br></div><div>If you would like to stay in pure Python, I would suggest using laspy in place of libLAS. It can be used on windows without trouble, and while it might be a little bit slower in some circumstances, it will be much easier to get going with.</div><div><br></div><div><a href="https://github.com/grantbrown/laspy">https://github.com/grantbrown/laspy</a></div><div><a href="http://pypi.python.org/pypi/laspy">http://pypi.python.org/pypi/laspy</a></div><div><br></div><div>Howard</div><div><br><div><div>On Sep 23, 2012, at 5:53 AM, gianni lavaredo <<a href="mailto:gianni.lavaredo@gmail.com">gianni.lavaredo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear memebrs list, <br><br>I wish to create un file *.exe for internal lab use with Python + Libals module. This exe read las file, shape file and clip the points inside the shapes file (ex: plots or polygons).<br><br>After I wrote the code I use py2exe to convert my *.py script in a *.exe. After that when i run my exe i have this message:<br>
<br>ClipLAS2LAS.exe<br>Traceback (most recent call last):<br>File "ClipLAS2LAS.py", line 14, in <module><br>File "liblas\__init__.pyc", line 2, in <module><br>File liblas\core.pyc",line 353, in __init__<br>
WindowsError: [Error 126] Impossible to find the specified module<br><br><br>Thanks!!! for any suggestions and Help<br>:)<br><br><br>This is my Python code:<br>#!/bin/env python<br><br>from liblas import file<br>from liblas import file as lasfile<br>
from liblas import vlr<br>from liblas import header as lasheader<br>import shapefile<br>import numpy as np<br>import matplotlib.nxutils as nx<br><br>#import os<br>#os.chdir("C:\PythonWork")<br>#print(os.listdir('.'))<br>
<br># LAS file INPUT<br>READFILE = raw_input("INPUT LAS filename (*.las):")<br># Shp file INPUT<br>READFILE_SHP = raw_input("INPUT Shapefile filename (*.shp):")<br>READFILE_SHP = str(READFILE_SHP)<br># LAS file OUTPUT<br>
WRITEFILE = raw_input("OUTPUT LAS filename (*.las):")<br><br><br>f = lasfile.File(READFILE,None,'rb') # open LAS<br>h = f.header<br>file_out = lasfile.File(WRITEFILE,header=h,mode='w')<br><br>sf = shapefile.Reader(READFILE_SHP) #open shpfile<br>
<br>shapes = sf.shapes()<br>for i in range(len(shapes)):<br>    verts = np.array(shapes[i].points,float)<br>    for p in f:<br>        test = nx.pnpoly(p.x,p.y, verts)<br>        if test == 1:<br>            file_out.write(p)<br>
        elif test == 0:<br>            del p<br><br>file_out.close()<br><br><br><br>
_______________________________________________<br>Liblas-devel mailing list<br><a href="mailto:Liblas-devel@lists.osgeo.org">Liblas-devel@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/liblas-devel<br></blockquote></div><br></div></body></html>