ee.initialize
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
लाइब्रेरी शुरू करें. अगर किसी ऑब्जेक्ट कंस्ट्रक्टर का इस्तेमाल करते समय इसे कॉल नहीं किया गया है, तो इसे कॉल किया जाएगा. अगर इसे दूसरी बार अलग baseurl या tileurl के साथ कॉल किया जाता है, तो यह पहले से लोड किए गए एल्गोरिदम को अन-इनिशियलाइज़ नहीं करता. हालांकि, यह उन्हें बदल देगा और वैकल्पिक सर्वर पर पॉइंट करने की अनुमति देगा.
अगर initialize() को एसिंक्रोनस मोड में पहली बार कॉल किया जाता है (सक्सेस कॉलबैक पास करके), तो एसिंक्रोनस मोड में किए जाने वाले सभी कॉल, अपनी कॉलबैक को एक कतार में जोड़ देंगे. इसके बाद, सभी कॉलबैक एक साथ चलाए जाएंगे.
अगर एसिंक्रोनस मोड में कई कॉल करने के बाद सिंक्रोनस मोड में कॉल किया जाता है, तो यह पहले से दिए गए सभी कॉलबैक को ब्लॉक कर देगा और उन्हें तब तक नहीं लौटाएगा, जब तक कि कॉल पूरा नहीं हो जाता.
ज़्यादातर मामलों में, लाइब्रेरी को शुरू करने से पहले, अनुमति देने वाला टोकन सेट किया जाना चाहिए. इसके लिए, ee.data.authorize() या ee.data.setAuthToken() का इस्तेमाल किया जा सकता है.
Python में, इस तरीके को ee.Initialize कहा जाता है. इसमें I कैपिटल लेटर में होता है. ध्यान दें कि JavaScript और Python के कुछ पैरामीटर अलग-अलग होते हैं. नीचे दिए गए opt_url और प्रोजेक्ट के अलावा, Python इन चीज़ों के साथ भी काम करता है: क्रेडेंशियल - 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 | स्ट्रिंग, ज़रूरी नहीं | एपीआई कॉल करते समय इस्तेमाल करने के लिए, क्लाइंट प्रोजेक्ट आईडी या नंबर (ज़रूरी नहीं). (Python आर्ग्युमेंट का नाम: project) |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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) |"]]