def test_merged_arrays(self): """Can we fetch merged PDAL data """ xml = fetch_xml('../test/data/filters/chip.xml') r = libpdalpython.PyPipeline(xml) r.execute() arrays = r.arrays() self.assertEqual(len(arrays), 43)
def test_merged_arrays(self): """Can we fetch merged PDAL data """ json = self.fetch_json('/data/filters/chip.json') r = libpdalpython.PyPipeline(json) r.execute() arrays = r.arrays() self.assertEqual(len(arrays), 43)
def test_execution(self): """Can we execute a PDAL pipeline""" x = self.fetch_json('/data/pipeline/pipeline_read.json') r = libpdalpython.PyPipeline(x) r.execute() import sys self.assertGreater(len(r.json), 200)
def test_array(self): """Can we fetch PDAL data as a numpy array""" xml = fetch_xml('../test/data/pipeline/pipeline_read.xml') r = libpdalpython.PyPipeline(xml) r.execute() arrays = r.arrays() self.assertEqual(len(arrays), 1) a = arrays[0] self.assertAlmostEqual(a[0][0], 637012.24, 7) self.assertAlmostEqual(a[1064][2], 423.92, 7)
def test_array(self): """Can we fetch PDAL data as a numpy array""" json = self.fetch_json('/data/pipeline/pipeline_read.json') r = libpdalpython.PyPipeline(json) r.execute() arrays = r.arrays() self.assertEqual(len(arrays), 1) a = arrays[0] self.assertAlmostEqual(a[0][0], 637012.24, 7) self.assertAlmostEqual(a[1064][2], 423.92, 7)
def __init__(self, json): if isinstance(json, str): data = json else: data = json.decode('UTF-8') self.p = libpdalpython.PyPipeline(data)
def test_execution(self): """Can we execute a PDAL pipeline""" xml = fetch_xml('../test/data/pipeline/pipeline_read.xml') r = libpdalpython.PyPipeline(xml) r.execute() self.assertEqual(len(r.xml), 2184)
def test_construction(self): """Can we construct a PDAL pipeline""" xml = fetch_xml('../test/data/pipeline/pipeline_read.xml') r = libpdalpython.PyPipeline(xml)
def __init__(self, json, arrays=None): if arrays: self.p = libpdalpython.PyPipeline(json, arrays) else: self.p = libpdalpython.PyPipeline(json)
def test_construction(self): """Can we construct a PDAL pipeline""" json = self.fetch_json('/data/pipeline/pipeline_read.json') r = libpdalpython.PyPipeline(json)
def test_execution(self): """Can we execute a PDAL pipeline""" xml = self.fetch_xml('/data/pipeline/pipeline_read.xml') r = libpdalpython.PyPipeline(xml) r.execute() self.assertGreater(len(r.xml), 1000)