22PDAL
33================================================================================
44
5- PDAL Python support allows you to process data with PDAL into `Numpy `_
6- arrays. It supports embedding Python in PDAL pipelines with the `readers.numpy <https://pdal.io/stages/readers.numpy.html >`__
7- and `filters.python <https://pdal.io/stages/filters.python.html >`__ stages, and it provides a PDAL extension module to control
8- Python interaction with PDAL.
5+ PDAL Python support allows you to process data with PDAL into `Numpy `_ arrays.
6+ It supports embedding Python in PDAL pipelines with the `readers.numpy
7+ <https://pdal.io/stages/readers.numpy.html> `__ and `filters.python
8+ <https://pdal.io/stages/filters.python.html> `__ stages, and it provides a PDAL
9+ extension module to control Python interaction with PDAL.
910
1011Additionally, you can use it to fetch `schema `_ and `metadata `_ from
1112PDAL operations.
@@ -67,10 +68,10 @@ Reading using Numpy Arrays
6768The following more complex scenario demonstrates the full cycling between
6869PDAL and Python:
6970
70- * Read a small testfile from GitHub into a Numpy array
71- * Filters those arrays with Numpy for Intensity
72- * Pass the filtered array to PDAL to be filtered again
73- * Write the filtered array to an LAS file.
71+ * Read a small testfile from GitHub into a Numpy array
72+ * Filters those arrays with Numpy for Intensity
73+ * Pass the filtered array to PDAL to be filtered again
74+ * Write the filtered array to an LAS file.
7475
7576.. code-block :: python
7677
@@ -93,8 +94,13 @@ PDAL and Python:
9394 count = pipeline.execute()
9495
9596 # get the data from the first array
96- # [array([(637012.24, 849028.31, 431.66, 143, 1, 1, 1, 0, 1, -9., 132, 7326, 245380.78254963, 68, 77, 88),
97- # dtype=[('X', '<f8'), ('Y', '<f8'), ('Z', '<f8'), ('Intensity', '<u2'), ('ReturnNumber', 'u1'), ('NumberOfReturns', 'u1'), ('ScanDirectionFlag', 'u1'), ('EdgeOfFlightLine', 'u1'), ('Classification', 'u1'), ('ScanAngleRank', '<f4'), ('UserData', 'u1'), ('PointSourceId', '<u2'), ('GpsTime', '<f8'), ('Red', '<u2'), ('Green', '<u2'), ('Blue', '<u2')])
97+ # [array([(637012.24, 849028.31, 431.66, 143, 1,
98+ # 1, 1, 0, 1, -9., 132, 7326, 245380.78254963, 68, 77, 88),
99+ # dtype=[('X', '<f8'), ('Y', '<f8'), ('Z', '<f8'), ('Intensity', '<u2'),
100+ # ('ReturnNumber', 'u1'), ('NumberOfReturns', 'u1'), ('ScanDirectionFlag', 'u1'),
101+ # ('EdgeOfFlightLine', 'u1'), ('Classification', 'u1'), ('ScanAngleRank', '<f4'),
102+ # ('UserData', 'u1'), ('PointSourceId', '<u2'),
103+ # ('GpsTime', '<f8'), ('Red', '<u2'), ('Green', '<u2'), ('Blue', '<u2')])
98104
99105 arr = pipeline.arrays[0 ]
100106 print (len (arr)) # 1065 points
0 commit comments