[Liblas-commits] hg: try rounding instead of int() cast
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu Dec 31 14:12:52 EST 2009
changeset b68046c37a6b in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=b68046c37a6b
summary: try rounding instead of int() cast
diffstat:
python/tests/File.txt | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diffs (53 lines):
diff -r 604a2c6d925c -r b68046c37a6b python/tests/File.txt
--- a/python/tests/File.txt Thu Dec 31 13:03:24 2009 -0600
+++ b/python/tests/File.txt Thu Dec 31 13:08:43 2009 -0600
@@ -139,15 +139,15 @@
<liblas.point.Point object at ...>
>>> for g in points:
- ... print round(g.x, 6), round(g.y, 6)
- 630262.3 4834500.0
- 630282.45 4834500.0
- 630300.07 4834500.0
- 630346.82 4834500.0
- 630327.58 4834500.0
- 630323.57 4834500.0
- 630320.95 4834500.0
- 630280.89 4834500.0
+ ... print round(g.x, 6)
+ 630262.3
+ 630282.45
+ 630300.07
+ 630346.82
+ 630327.58
+ 630323.57
+ 630320.95
+ 630280.89
Now try writing a 1.2 version of the junk2.las file above to ensure that
the data_offset *doesn't* change at all
@@ -184,15 +184,15 @@
<liblas.point.Point object at ...>
>>> for g in points:
- ... print round(g.x, 6), round(g.y, 6)
- 630262.3 4834500.0
- 630282.45 4834500.0
- 630300.07 4834500.0
- 630346.82 4834500.0
- 630327.57 4834500.0
- 630323.57 4834500.0
- 630320.95 4834500.0
- 630280.89 4834500.0
+ ... print round(g.x, 6)
+ 630262.3
+ 630282.45
+ 630300.07
+ 630346.82
+ 630327.57
+ 630323.57
+ 630320.95
+ 630280.89
>>> import os
>>> os.remove('junk.las')
More information about the Liblas-commits
mailing list