[go: up one dir, main page]

Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
dlhauser authored Jul 23, 2020
1 parent 8a4e94d commit 18223bc
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 0 deletions.
63 changes: 63 additions & 0 deletions DecimatePoints/PDAL_BatchProcess_Decimate.bat
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%
13 changes: 13 additions & 0 deletions DecimatePoints/center.json
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"
}
]
13 changes: 13 additions & 0 deletions DecimatePoints/centroid.json
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"
}
]
13 changes: 13 additions & 0 deletions DecimatePoints/decimate.json
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"
}
]
13 changes: 13 additions & 0 deletions DecimatePoints/sample.json
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"
}
]

0 comments on commit 18223bc

Please sign in to comment.