[Liblas-commits] hg: update some tests to reflect Frank's work.
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Sep 22 13:49:47 EDT 2010
changeset 8d27a317b12e in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=8d27a317b12e
summary: update some tests to reflect Frank's work.
diffstat:
python/tests/SRS-GDAL.txt | 17 ++++++++++++-----
python/tests/VLR.txt | 4 ++--
2 files changed, 14 insertions(+), 7 deletions(-)
diffs (66 lines):
diff -r 4e85994594ad -r 8d27a317b12e python/tests/SRS-GDAL.txt
--- a/python/tests/SRS-GDAL.txt Wed Sep 22 12:42:17 2010 -0500
+++ b/python/tests/SRS-GDAL.txt Wed Sep 22 12:49:42 2010 -0500
@@ -6,14 +6,14 @@
>>> s = srs.SRS()
>>> s.proj4
''
- >>> s.proj4 = '+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'
- >>> s.proj4 == '+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '
+ >>> s.proj4 = '+proj=utm +zone=15 +datum=WGS84 +units=m +no_defs'
+ >>> s.proj4 == '+proj=utm +zone=15 +datum=WGS84 +units=m +no_defs '
True
>>> s = srs.SRS()
>>> s.set_userinput('EPSG:4326')
True
- >>> s.proj4 == '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '
+ >>> s.proj4 == '+proj=longlat +datum=WGS84 +no_defs '
True
>>> from liblas import file
@@ -87,14 +87,21 @@
>>> f.set_srs(s_dd)
True
>>> p = f.read(0)
+
+We only get truncated values because our header scale
+values are 0.01
+
>>> p.x, p.y
- (-93.351562590199833, 41.577148395415108)
+ (-93.350000000000009, 41.579999999999998)
+
+#real values
+# (-93.351562590199833, 41.577148395415108)
>>> f_project = file.File('junk_srs_project.las',mode='w',header=dd_header)
>>> dd_header.srs.proj4
- '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '
+ '+proj=longlat +datum=WGS84 +no_defs '
>>> f_project.write(p);f_project.write(p);f_project.write(p)
>>> f_project.close()
>>> del f_project
diff -r 4e85994594ad -r 8d27a317b12e python/tests/VLR.txt
--- a/python/tests/VLR.txt Wed Sep 22 12:42:17 2010 -0500
+++ b/python/tests/VLR.txt Wed Sep 22 12:49:42 2010 -0500
@@ -63,7 +63,7 @@
>>> h = f.header
>>> h.records_count
3L
-
+
>>> def test_srs():
... s = h.srs
... if not liblas.HAVE_LIBGEOTIFF:
@@ -71,7 +71,7 @@
... if not liblas.HAVE_GDAL:
... return s.proj4 == '+proj=utm +zone=17 +ellps=WGS84 +units=m '
... if liblas.HAVE_GDAL:
- ... return s.proj4 == '+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '
+ ... return s.proj4 == '+proj=utm +zone=17 +datum=WGS84 +units=m +no_defs '
... return False
>>> test_srs()
More information about the Liblas-commits
mailing list