-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bfc4740
commit 1e6a0a5
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Example python script used to demonstrate the usage of local python scripts inside models | ||
""" | ||
import argparse | ||
import shutil | ||
|
||
import pdal | ||
|
||
|
||
from pdal_ign_macro import version as pim_version | ||
|
||
from examples.model_hight.calculate_hight_bridge import create_highest_points_raster | ||
from examples.model_mnt.calculate_mnt_bridge import create_mnt_points_raster | ||
|
||
|
||
def parse_args(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument( | ||
"-i", "--input_file", type=str, help="Input las/laz file on which to run the script" | ||
) | ||
parser.add_argument("-o", "--output_file", type=str, help="Out las/laz file of the script") | ||
return parser.parse_args() | ||
|
||
|
||
def main(input_file, output_file): | ||
print("Pdal version is:", pdal.__version__) | ||
print("pdal_ign_macro version is:", pim_version.__version__) | ||
|
||
print("Lauch Hight model") | ||
create_highest_points_raster( | ||
input_file, | ||
output_file, | ||
0.1, | ||
1000, | ||
1000, | ||
"EPSG:2154", | ||
-9999 | ||
) | ||
|
||
print("Lauch MNT model") | ||
create_mnt_points_raster( | ||
input_file, | ||
output_file, | ||
0.1, | ||
1000, | ||
1000, | ||
"EPSG:2154", | ||
-9999 | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
args = parse_args() | ||
main(args.input_file, args.output_file) |