Python (3) 썸네일형 리스트형 엑셀파일에 있는 GRS80(x,y)를 WGS84 로 변환하기 from pyproj import Proj from pyproj import transform import openpyxl WGS84 = { 'proj':'latlong', 'datum':'WGS84', 'ellps':'WGS84', } # GRS80(Geodetic Reference System 1980:측지 기준계 1980)의 타원체 GRS80 = { 'proj':'tmerc', 'lat_0':'38', 'lon_0':'127', 'k':1, 'x_0':200000, 'y_0':600000, 'ellps':'GRS80', 'units':'m' } def grs80_to_wgs84(x, y): return transform( Proj(**GRS80), Proj(**WGS84), x, y ) wb = o.. psycopg2 error Python으로 Postgresql을 이용할 일이 생겨서 psycopg2를 설치하기위해 pip install psycopg2 하였는데 처음에 난 error는 pg_conf executable not found error가 났다. postgresql을 지우고 다시 설치 brew uninstall postgresql brew install postgresql 터미널에서 daniel$ export LDFLAGS="-L/usr/local/opt/openssl/lib" 12.2 는 postgresql version 설치된 버전을 넣어주시면 됩니다. daniel$ PATH="/Applications/Postgres.app/Contents/12.2/latest/bin:$PATH" pip install psycopg2.. 파이썬으로 시청,구청 x,y 좌표 가져오기 GRS80 UTM-K 기준 x,y 위치정보요약DB. 에서 자료를 다운 받아서 압축을 풀었는데 Mac에서 열리지 않았다. 찾아보니 파일 변환이 필요하다고 해서 파일 변환을 각 지역 파일마다 해주었습니다. iconv -c -f euc-kr -t utf-8 entrc_seoul.txt >entrc_seoul_u.txt 파일을 열어보면 이렇게 엄청 많다..... 난 시청과 구청 지역 정보만 가져오면 되기 때문에 파이썬으로 스크립트를.... import os filename = input("파일이름을 입력하세요") print(filename) f = open(filename, mode='r', encoding='utf-8') content = f.read() f.close() a = content.split('\.. 이전 1 다음