Skip to content

Instantly share code, notes, and snippets.

View shnhrtkyk's full-sized avatar
🏠
Working from home

teddy shnhrtkyk

🏠
Working from home
View GitHub Profile
@shnhrtkyk
shnhrtkyk / split.sh
Last active July 6, 2019 05:11
splitimages
for file in `\find . -maxdepth 1 -type f`; do convert -crop 300x300 $file ${file:0:-4}'.jpg'; done
@shnhrtkyk
shnhrtkyk / get_pytorch_tensor.py
Created June 4, 2019 22:01
PytorchのCUDA tensorをnumpyに変換
cudatensor.detach().cpu().numpy()
@shnhrtkyk
shnhrtkyk / lasFW2txt.sh
Created July 6, 2019 05:06
Converting Full Waveform LiDAR LAS file to txt file
las2txt -i lidar_1_3.las -o lidar.txt -parse xyzWV
@shnhrtkyk
shnhrtkyk / las2txt_dir.sh
Last active July 8, 2019 02:20
FWLiDARのlas形式を一括でtxtに変換する
#!/bin/sh
dir_path="/PATH/*"
dirs=`find $dir_path -maxdepth 2 -type f -name *.las`
for dir in $dirs;
do
echo $dir
echo ${dir%.*}.txt
@shnhrtkyk
shnhrtkyk / dir_loop_call_python.sh
Last active July 9, 2019 00:29
ディレクトリ内のファイルを引数を渡してpythonで処理する
#!/bin/sh
dir_path="/path/*"
dirs=`find $dir_path -maxdepth 2 -type f -name *.txt`
for dir in $dirs;
do
echo $dir
echo ${dir%.*}.npz
@shnhrtkyk
shnhrtkyk / lasmearge.sh
Created July 9, 2019 00:29
分割されたlasを結合する
lasmerge -i in1.las in2.las in3.las -o out.las
@shnhrtkyk
shnhrtkyk / las2txt_xyzirc.sh
Created July 9, 2019 02:00
las形式からxyz強度パルスの番号クラス形式のtxtに変換
las2txt.exe -i input.las -o output.txt -parse xyzirc
@shnhrtkyk
shnhrtkyk / las2txt.bat
Created July 9, 2019 05:15
las形式のx, y, z, 強度,リターンナンバー,クラスの情報をtxtに変換
@echo off
for %%a in (G:\path\to\*.las) do (
call :sub "%%a"
)
goto :EOF
:sub
@shnhrtkyk
shnhrtkyk / diff.bat
Created July 12, 2019 07:52
2つのlas形式やtxt形式の点群データを比較する
/path/to/lastools/lasdiff.exe -i input1.las -i linput2.las -o output.las
@shnhrtkyk
shnhrtkyk / point2raster.bat
Created July 16, 2019 06:18
irregularなx, yデータからラスター形式に変換する
¥path¥to¥lasgrid.exe -i input.txt -o output.tif -elevation_hightest
¥path¥to¥lasgrid.exe -i input.txt -o output.tif -elevation_lowest