Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
  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)
Example #5
0
    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)
Example #6
0
 def __init__(self, json):
     if isinstance(json, str):
         data = json
     else:
         data = json.decode('UTF-8')
     self.p = libpdalpython.PyPipeline(data)
Example #7
0
 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)
Example #8
0
 def test_construction(self):
   """Can we construct a PDAL pipeline"""
   xml = fetch_xml('../test/data/pipeline/pipeline_read.xml')
   r = libpdalpython.PyPipeline(xml)
Example #9
0
    def __init__(self, json, arrays=None):

        if arrays:
            self.p = libpdalpython.PyPipeline(json, arrays)
        else:
            self.p = libpdalpython.PyPipeline(json)
Example #10
0
 def test_construction(self):
     """Can we construct a PDAL pipeline"""
     json = self.fetch_json('/data/pipeline/pipeline_read.json')
     r = libpdalpython.PyPipeline(json)
Example #11
0
 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)