Permalink
Browse files

provide standard python library decoration for laspy

  • Loading branch information...
1 parent 6e0ff76 commit 58b0c864101340d6c3d937c5cb8db0c9ba17402f @hobu hobu committed May 26, 2012
View
@@ -0,0 +1,4 @@
+laspy.egg-info/
+*.pyc
+docs/build
+build/
View
@@ -0,0 +1,27 @@
+laspy License
+==============================================================================
+Copyright (c) 2012, Grant Brown, grant.brown73 at gmail.com
+Copyright (c) 2012, Howard Butler, hobu.inc at gmail.com
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
View
No changes.
View
@@ -0,0 +1 @@
+__version__ = '0.1.0'
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,37 @@
+
+from glob import glob
+from setuptools import setup
+
+import laspy
+
+# Get text from README.txt
+#readme_text = file('docs/source/README.txt', 'rb').read()
+
+
+setup(name = 'laspy',
+ version = laspy.__version__,
+ description = 'Native Python ASPRS LAS read/write library',
+ license = 'BSD',
+ keywords = 'gis lidar las',
+ author = 'Grant Brown',
+ author_email = 'grant.brown73@gmail.com',
+ maintainer = 'Howard Butler',
+ maintainer_email = 'hobu@hobu.net',
+ url = 'https://github.com/grantbrown/laspy',
+ long_description = '',
+ packages = ['laspy'],
+ install_requires = ['distribute'],
+ test_suite = 'test.test_laspy',
+ data_files = None,
+ zip_safe = False,
+ classifiers = [
+ 'Development Status :: 4 - Beta',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: Science/Research',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Scientific/Engineering :: GIS'
+ ],
+)
+
View
@@ -0,0 +1 @@
+from test_laspy import test_laspy
View
Binary file not shown.
@@ -1,12 +1,14 @@
-from base import *
-import file as File
-import header as lasheader
+from laspy.base import *
+import laspy.file as File
+import laspy.header as lasheader
+
import unittest
import os
class LasReaderTestCase(unittest.TestCase):
+ simple = "./test/data/simple.las"
def setUp(self):
- inFile = open("../simple.las", "r")
+ inFile = open(self.simple, "r")
inData = inFile.read()
outFile = open("./.temp.las", "w")
outFile.write(inData)
@@ -157,8 +159,9 @@ def tearDown(self):
class LasWriterTestCase(unittest.TestCase):
+ simple = './test/data/simple.las'
def setUp(self):
- inFile = open("../simple.las", "r")
+ inFile = open(self.simple, "r")
inData = inFile.read()
outFile = open("./.temp.las", "w")
outFile.write(inData)
@@ -228,5 +231,13 @@ def tearDown(self):
os.remove("./.temp.las")
-if __name__=="__main__":
- unittest.main()
+def test_laspy():
+ reader = unittest.TestLoader().loadTestsFromTestCase(LasReaderTestCase)
+ writer = unittest.TestLoader().loadTestsFromTestCase(LasWriterTestCase)
+ return unittest.TestSuite([reader, writer])
+
+# if __name__=="__main__":
+# runner = unittest.TextTestRunner()
+# runner.run(test_laspy())
+
+ # unittest.main()
View
@@ -1,17 +0,0 @@
-#from .core import *
-from core import get_version
-from core import las
-version = get_version()
-HAVE_GDAL = bool(las.LAS_IsGDALEnabled())
-HAVE_LIBGEOTIFF = bool(las.LAS_IsLibGeoTIFFEnabled())
-
-import sys
-
-version = sys.version_info[:3]
-
-import file
-import point
-import header
-import vlr
-import color
-import srs

0 comments on commit 58b0c86

Please sign in to comment.