QGIS 툴로 footprint 배치로 돌리는 방법
1. 영상 root 가서 cmd 열고 파일명 txt로 뽑기
#로컬
dir /s /b *.tif > list.txt
# 네트워크
Get-ChildItem -Path *8b_clip.tif > list.txt
2. .bat으로 저장
Get-ChildItem -Filter *.tif | ForEach-Object {
$name = $_.Name
$geojson = [System.IO.Path]::ChangeExtension($name, '.geojson')
$gdalPath = "C:\Program Files\QGIS 3.34.8\bin\gdal_footprint.exe"
"$gdalPath -t_srs EPSG:5179 $name $geojson"
} | Out-File -Encoding ASCII -FilePath "output.bat"
안되네,,,
bat으로 안하려면 엑셀로해야하나??
2-1. 파일 예시
gdal_footprint.exe -t_srs EPSG:4326 1.tif 1.geojson
gdal_footprint.exe -t_srs EPSG:4326 2.tif 2.geojson
gdal_footprint.exe -t_srs EPSG:4326 input.tif output.geojson
gdal_footprint.exe -t_srs EPSG:4326 input.tif output.geojson
gdal_footprint.exe -t_srs EPSG:4326 input.tif output.geojson
gdal_footprint.exe -t_srs EPSG:4326 input.tif output.geojson
gdal_footprint.exe -t_srs EPSG:4326 input.tif output.geojson
gdal_footprint.exe -t_srs EPSG:4326 input.tif output.geojson
3. bat 파일 실행
기본 명령어
1. footprint
C:\Program Files\QGIS 3.34.8\bin\gdal_footprint.exe -t_srs EPSG:5179 input.tif output.geojson
2. geojson -> shp로 변환
ogr2ogr -f "ESRI Shapefile" xView_train.shp xView_train.geojson
'Computer' 카테고리의 다른 글
Tensorflow Docker 환경 설정 (0) | 2024.05.11 |
---|---|
Ubuntu20.04 nvidia-driver installation Error (0) | 2024.05.03 |
Linux booting error nvidia-driver install nvidia-smi failed (0) | 2024.05.03 |
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (1) | 2024.04.22 |
딥러닝 학습 시 tmux 세션 중단 현상 해결 (1) | 2024.04.17 |