ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • FWTools를 이용한 다양한 좌표계 변환 방법
    오픈 소스 GIS/GDAL_OGR 2011. 12. 21. 16:11

    *단일 좌표

    - cs2cs 을 이용

    예)
    cs2cs +proj=tmerc +lat_0=38N +lon_0=128E +ellps=bessel +x_0=400000 +y_0=600000 +k=0.9999 +towgs84=-145.907,505.034,685.756,-1.162,2.347,1.592,6.342 +to +proj=latlong +datum=WGS84 +ellps=WGS84 -f %f [Enter] 400196 599694 [Enter]

    참고) http://cafe.naver.com/googlesketchup.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=149&


    *좌표 리스트 파일

    - cs2cs을 이용

    예)
    cs2cs +proj=tmerc +lat_0=38N +lon_0=128E +ellps=bessel +x_0=400000 +y_0=600000 +k=0.9999 +towgs84=-145.907,505.034,685.756,-1.162,2.347,1.592,6.342 +to +proj=latlong +datum=WGS84 +ellps=WGS84 -f %f CoordList.txt

    참고) CootdList.txt에는 x, y 값이 빈칸으로 구분되어 들어 있어야 함
     

    *백터 자료

    - ogr2ogr을 이용

    예)
    ogr2ogr -s_srs "+proj=tmerc +lat_0=38 +lon_0=127 +k=1 +x_0=200000 +y_0=600000 +ellps=GRS80 +units=m +no_defs" -t_srs "+proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" -f "ESRI Shapefile" -skipfailures target.shp source.shp --config SHAPE_ENCODING "EUC-KR"

    참고) 명령 제일 마지막에 대상파일, 원본파일 순으로 기술되야 함이 특이하니 주의!
    참고) OGR 1.7 이상에서는 한글이 있는 경우 코드페이지를 지정해 주어야 한다. 


    *래스터 영상

    - gdalwarp을 이용

    예)
    gdalwarp -s_srs "+proj=tmerc +lat_0=38 +lon_0=127 +k=1 +x_0=200000 +y_0=600000 +ellps=GRS80 +units=m +no_defs" -t_srs "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs" -of GTiff -r cubic source.img target.tif
    참고) 인풋, 아웃풋 널 값을 지정할 수 있으니 모자이크가 필요한 영상은 꼭 주의! 


Designed by Tistory.