공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.initialize
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
라이브러리를 초기화합니다. 객체 생성자가 사용될 때까지 이 함수가 호출되지 않았다면 그때 호출됩니다. 다른 baseurl 또는 tileurl로 두 번째 호출되면 이전에 로드된 알고리즘의 초기화 해제가 실행되지 않지만 이를 덮어쓰고 대체 서버를 가리키도록 합니다.
성공 콜백을 전달하여 비동기 모드에서 initialize()를 처음 호출하면 향후 비동기 모드 호출에서 콜백이 대기열에 추가되고 모든 콜백이 함께 실행됩니다.
비동기 호출이 여러 번 이루어진 후 동기 모드 호출이 이루어지면 반환되기 전에 차단되고 이전에 제공된 모든 콜백이 실행됩니다.
대부분의 경우 ee.data.authorize() 또는 ee.data.setAuthToken()을 사용하여 라이브러리를 초기화하기 전에 승인 토큰을 설정해야 합니다.
Python에서는 이 메서드의 이름이 ee.Initialize(대문자 I)입니다. 일부 매개변수는 JavaScript와 Python 간에 다릅니다. 아래의 opt_url 및 project 외에도 Python은 credentials(저장된 사용자 인증 정보를 사용하는 google.oauth2.Credentials 객체 또는 'persistent', 기본값) 및 http_transport(httplib2.Http 클라이언트)도 지원합니다.
사용 | 반환 값 |
---|
ee.initialize(baseurl, tileurl, successCallback, errorCallback, xsrfToken, project) | |
인수 | 유형 | 세부정보 |
---|
baseurl | 문자열, 선택사항 | Earth Engine REST API 엔드포인트입니다.
(Python 인수 이름: opt_url) |
tileurl | 문자열, 선택사항 | Earth Engine REST 타일 엔드포인트입니다. 선택사항이며 기본값은 baseurl입니다. (JavaScript만 해당) |
successCallback | 함수(선택사항) | 초기화가 성공하면 호출되는 선택적 콜백입니다. 제공되지 않으면 초기화가 동기식으로 실행됩니다. (JavaScript만 해당) |
errorCallback | 함수(선택사항) | 초기화가 실패할 경우 오류와 함께 호출할 콜백입니다(선택사항). (JavaScript만 해당) |
xsrfToken | 문자열, 선택사항 | EE API XHR의 'xsrfToken' 매개변수에 전달할 문자열입니다. (JavaScript만 해당) |
project | 문자열, 선택사항 | API 호출 시 사용할 선택적 클라이언트 프로젝트 ID 또는 번호입니다. (Python 인수 이름: project) |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003eee.initialize()\u003c/code\u003e function initializes the Earth Engine library, setting the API endpoint and optional tile server.\u003c/p\u003e\n"],["\u003cp\u003eInitialization can be performed synchronously or asynchronously with success and error callbacks.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization should typically be handled before initialization using \u003ccode\u003eee.data.authorize()\u003c/code\u003e or \u003ccode\u003eee.data.setAuthToken()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eee.initialize()\u003c/code\u003e offers parameters for customization, like base URL, tile URL, and project ID.\u003c/p\u003e\n"],["\u003cp\u003eThe Python equivalent is \u003ccode\u003eee.Initialize()\u003c/code\u003e, with minor parameter differences compared to JavaScript.\u003c/p\u003e\n"]]],[],null,["# ee.initialize\n\n\u003cbr /\u003e\n\nInitialize the library. If this hasn't been called by the time any object constructor is used, it will be called then. If this is called a second time with a different baseurl or tileurl, this doesn't do an un-initialization of e.g.: the previously loaded Algorithms, but will overwrite them and let point at alternate servers.\n\n\u003cbr /\u003e\n\nIf initialize() is first called in asynchronous mode (by passing a success callback), any future asynchronous mode calls will add their callbacks to a queue and all the callbacks will be run together.\n\nIf a synchronous mode call is made after any number of asynchronous calls, it will block and execute all the previously supplied callbacks before returning.\n\nIn most cases, an authorization token should be set before the library is initialized, either with ee.data.authorize() or ee.data.setAuthToken().\n\nIn Python, this method is named ee.Initialize, with a capital I. Note that some parameters differ between JavaScript and Python. In addition to opt_url and project below, Python also supports: credentials - a google.oauth2.Credentials object or 'persistent' to use stored credentials (the default); http_transport - a httplib2.Http client.\n\n| Usage | Returns |\n|--------------------------------------------------------------------------------------------------------------------|---------|\n| `ee.initialize(`*baseurl* `, `*tileurl* `, `*successCallback* `, `*errorCallback* `, `*xsrfToken* `, `*project*`)` | |\n\n| Argument | Type | Details |\n|-------------------|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `baseurl` | String, optional | The Earth Engine REST API endpoint. (Python argument name: opt_url) |\n| `tileurl` | String, optional | The Earth Engine REST tile endpoint, this is optional and defaults to baseurl. (JavaScript only) |\n| `successCallback` | Function, optional | An optional callback to be invoked when the initialization is successful. If not provided, the initialization is done synchronously. (JavaScript only) |\n| `errorCallback` | Function, optional | An optional callback to be invoked with an error if the initialization fails. (JavaScript only) |\n| `xsrfToken` | String, optional | A string to pass in the \"xsrfToken\" parameter of EE API XHRs. (JavaScript only) |\n| `project` | String, optional | Optional client project ID or number to use when making API calls. (Python argument name: project) |"]]