-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpdal_practice.py
69 lines (64 loc) · 1.51 KB
/
pdal_practice.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# import laspy
import open3d, laspy, pdal
# import open3d.visualization
##リサンプリング
# json = r"""{
# "pipeline": [
# {
# "type": "readers.pts",
# "filename": "./data/ShibuyaUnderground.pts"
# },
# {
# "type": "filters.decimation",
# "step": 5
# },
# {
# "type": "writers.pcd",
# "filename":"./data/ShibuyaUnderground_resample.pcd"
# }
# ]
# }"""
##GeoTIFF化
# json = r"""{
# "pipeline": [
# "./data/ShibuyaUnderground.pts",
# {
# "type": "filters.reprojection",
# "out_srs": "EPSG:6677"
# },
# {
# "type": "filters.faceraster",
# "resolution": 1
# },
# {
# "type": "writers.gdal",
# "gdaldriver": "GTiff",
# "output_type": "all",
# "resolution": "1.0",
# "filename":"./data/ShibuyaUnderground-gtiff.tif"
# }
# ]
# }"""
##TIFF化
json = r"""{
"pipeline": [
"./data/ShibuyaUnderground.pts",
{
"type": "filters.faceraster",
"resolution": 1
},
{
"type": "writers.raster",
"filename":"./data/ShibuyaUnderground.tif"
}
]
}"""
pipeline = pdal.Pipeline(json)
count = pipeline.execute()
arrays = pipeline.arrays
metadata = pipeline.metadata
log = pipeline.log
print(count)
print(arrays)
print(metadata)
print(log)