[Liblas-commits] hg: tweaks again
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Oct 19 15:40:19 EDT 2009
changeset c69ff73c7a79 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=c69ff73c7a79
summary: tweaks again
diffstat:
python/scripts/oci2las.py | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 7f1aaecce916 -r c69ff73c7a79 python/scripts/oci2las.py
--- a/python/scripts/oci2las.py Mon Oct 19 14:20:23 2009 -0500
+++ b/python/scripts/oci2las.py Mon Oct 19 15:38:07 2009 -0400
@@ -129,6 +129,7 @@
for i in xrange(num_points):
rng = ptsize*i,ptsize*(i+1)
+ print num_points, len(blob)
d = struct.unpack(format,blob[ptsize*i:ptsize*(i+1)])
x, y, z, blk_id, pt_id = d
p = point.Point()
@@ -214,12 +215,15 @@
# write an actual cloud column
for cloud in clouds:
- self.cur.execute('SELECT NUM_POINTS, POINTS FROM %s'% cloud.BLK_TABLE)
- blocks = self.cur.fetchall()
+ cur2 = self.con.cursor()
+
+ cur2.execute('SELECT NUM_POINTS, POINTS FROM %s'% cloud.BLK_TABLE)
- for block in blocks:
- num_points, blob = block[0], block[1].read()
- points.append(self.get_points(num_points,blob))
+ for num_points, blob in cur2:
+# num_points, blob = block[0], block[1].read()
+# print num_points, blob
+ b = blob.read()
+ points.append(self.get_points(num_points,b))
num_pts_index, blob_index = self.get_block_indexes(self.cur)
@@ -267,4 +271,4 @@
d.process()
if __name__=='__main__':
- main()
\ No newline at end of file
+ main()
More information about the Liblas-commits
mailing list