-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
5 changed files
with
115 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,63 @@ | ||
@echo off | ||
REM *** Batch process LAS files with a PIPELINE - Decimate point cloud *** | ||
echo( | ||
setlocal enabledelayedexpansion | ||
REM *** Set INPUT and OUTPUT directories *** | ||
set indir=C:\Users\Darren\Documents\PDAL\Test | ||
set outdir=C:\Users\Darren\Documents\PDAL\Test\Results | ||
REM *** Activate Command Prompt and PDAL *** | ||
call C:\Anaconda3\Scripts\activate.bat | ||
call conda activate lidar | ||
set T0=%time% | ||
echo Choose Decimate Option | ||
echo 1. Simple Decimation (Fast) | ||
echo 2. Voxel Center | ||
echo 3. Voxel Centroid | ||
echo 4. Poisson Sampling (Slow) | ||
echo( | ||
set /p choice="Option: " | ||
REM *** Specify the pipeline to run *** | ||
if "%choice%"=="1" ( | ||
for %%f in (%indir%\*.las) do ( | ||
set outname=%outdir%\%%~nf.las | ||
echo( | ||
echo Running PDAL filters.decimation | ||
echo Read %%f | ||
echo Write !outname! | ||
pdal pipeline -i C:\Users\Darren\Documents\PDAL\DecimatePoints\decimate.json --readers.las.filename=%%f --writers.las.filename=!outname! | ||
) | ||
) | ||
if "%choice%"=="2" ( | ||
for %%f in (%indir%\*.las) do ( | ||
set outname=%outdir%\%%~nf.las | ||
echo( | ||
echo Running PDAL filters.voxelcenternearestneighbor | ||
echo Read %%f | ||
echo Write !outname! | ||
pdal pipeline -i C:\Users\Darren\Documents\PDAL\DecimatePoints\center.json --readers.las.filename=%%f --writers.las.filename=!outname! | ||
) | ||
) | ||
if "%choice%"=="3" ( | ||
for %%f in (%indir%\*.las) do ( | ||
set outname=%outdir%\%%~nf.las | ||
echo( | ||
echo Running PDAL filters.voxelcentroidnearestneighbor | ||
echo Read %%f | ||
echo Write !outname! | ||
pdal pipeline -i C:\Users\Darren\Documents\PDAL\DecimatePoints\centroid.json --readers.las.filename=%%f --writers.las.filename=!outname! | ||
) | ||
) | ||
if "%choice%"=="4" ( | ||
for %%f in (%indir%\*.las) do ( | ||
set outname=%outdir%\%%~nf.las | ||
echo( | ||
echo Running PDAL filters.sample | ||
echo Read %%f | ||
echo Write !outname! | ||
pdal pipeline -i C:\Users\Darren\Documents\PDAL\DecimatePoints\sample.json --readers.las.filename=%%f --writers.las.filename=!outname! | ||
) | ||
) | ||
echo( | ||
set T1=%time% | ||
echo Start Time: %T0% | ||
echo End Time: %T1% |
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,13 @@ | ||
[ | ||
{ | ||
"type": "readers.las" | ||
}, | ||
{ | ||
"type": "filters.voxelcenternearestneighbor", | ||
"cell": "1" | ||
}, | ||
{ | ||
"type": "writers.las", | ||
"forward": "all" | ||
} | ||
] |
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,13 @@ | ||
[ | ||
{ | ||
"type": "readers.las" | ||
}, | ||
{ | ||
"type": "filters.voxelcentroidnearestneighbor", | ||
"cell": "1" | ||
}, | ||
{ | ||
"type": "writers.las", | ||
"forward": "all" | ||
} | ||
] |
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,13 @@ | ||
[ | ||
{ | ||
"type": "readers.las" | ||
}, | ||
{ | ||
"type": "filters.decimation", | ||
"step": "10" | ||
}, | ||
{ | ||
"type": "writers.las", | ||
"forward": "all" | ||
} | ||
] |
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,13 @@ | ||
[ | ||
{ | ||
"type": "readers.las" | ||
}, | ||
{ | ||
"type": "filters.sample", | ||
"radius": "1" | ||
}, | ||
{ | ||
"type": "writers.las", | ||
"forward": "all" | ||
} | ||
] |