<div>hi, I'm attempting to write the following python code to change the projection information stored in a las 1.1 file in the manner of a demo python script on the liblas site.</div>
<div>setup is python2.5, liblas 1.0, using the PyPI python bindings. I'm also not a C programmer.</div>
<div> </div>
<div>from liblas import file</div>
<div># read the header<br>f = file.File('C:\\bin\\test.las')<br>h = f.header</div>
<div># make sure to close the file<br>f.close()</div>
<div># make our edits to the header</div>
<div># change the software id to libLAS<br>h.software_id = 'libLAS'</div>
<div> </div>
<div>#...more stuff from demo...</div>
<div> </div>
<div>h.proj4 = '+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs'</div>
<div># reopen the file in append mode and write our updated header<br>f = file.File('C:\\bin\\test.las', mode='w+', header=h)<br>f.close()</div>
<div> </div>
<div>this returns LASException: LASError in "LASWriter_Create": PROJ.4 string is invalid or unsupported</div>
<div> </div>
<div>Now, I've also attempted to simply write the files' header back to itself like such</div>
<div> </div>
<div>f = file.File('C:\\bin\\test.las')<br>h = f.header</div>
<div>f.close()</div>
<div>f = file.File('C:\\bin\\test.las', mode='w+', header=h)<br>f.close()</div>
<div> </div>
<div>and I get the same message since I'm writing the original header. I'm a bit new to this so is there anything obvious I should be aware of?</div>
<div> </div>
<div>Thanks in advance</div>
<div>-Wes</div>