REMOTE SENSING

Google Earth Engine(구글어스엔진): credentials 파일 확인하는 법

유병혁 2023. 12. 27. 23:47

안녕하세요? 이번 글은 Google Earth Engine(구글어스엔진, GEE)에서 "credentials(크리덴셜, 자격증명)" 파일을 확인하는 방법을 간략히 정리해 보겠습니다. 후속으로 "Streamlit(스트림릿)으로 Google Earth Engine 웹 앱 배포하기" 콘텐츠를 작성할 예정인데요, 이때 credentials 파일 정보가 필요합니다.

 

Earth Engine Python 클라이언트 라이브러리를 사용하기 전에 사용자는 인증(authenticate)과 자격증명(credentials)을 사용하여 Python 클라이언트를 초기화(https://developers.google.com/earth-engine/guides/auth)해야 합니다.

import ee

# Earth Engine 인증
ee.Authenticate()

 

이때 인증 성공시 발급되는 "Earth Engine 토큰(token)"은 운영체제에 따라 아래 파일 경로에서 확인하실 수 있습니다.

  • Windows: C:\Users\USERNAME\.config\earthengine\credentials
  • Linux: /home/USERNAME/.config/earthengine/credentials
  • MacOS: /Users/USERNAME/.config/earthengine/credentials

Windows 운영체제에서 credentials 파일을 확인한 예는 다음과 같습니다. 다음 글에서는 이 정보를 가지고 "Streamlit(스트림릿)으로 Google Earth Engine 웹 앱 배포하기" 콘텐츠를 정리해 보겠습니다.