gdal_translate 이미지 잘라내기

Tiff 파일중 자신의 관심 영역만을 잘라내는 기능이다.

2가지 방법이 있다.
첫 번째 방법은 이미지 픽셀 값으로 이미지 잘라내기 기능이다.
>gdal_translate -srcwin xoff yoff xsize ysize 원본.tif  복사본.tif
         explain)Selects a subwindow from the source image for copying based on pixel/line location.

두 번째 방법으로 좌표점을 알 수 있는 tif 파일에서 절대 좌표를 기준으로 잘라내기 기능이다.
>gdal_translate -projwin ulx uly lrx lry inraster.tif outraster.tif
          explain)Selects a subwindow from the source image for copying (like -srcwin) but with the corners given in georeferenced coordinates (by default expressed in the SRS of the dataset. Can be changed with -projwin_srs).


댓글

이 블로그의 인기 게시물

HP 서버 OS 설치시 HDD를 잡지 못하는 문제

python-gdal 설치

Mysql JOIN 사용시 컬럼이름 중복해결