ee.FeatureCollection.getInfo

यह एक ज़रूरी फ़ंक्शन है. यह AJAX कॉल के ज़रिए, इस कलेक्शन के बारे में पूरी जानकारी दिखाता है.

यह फ़ंक्शन, कलेक्शन की जानकारी दिखाता है. इसके फ़ील्ड में ये शामिल हैं:

  - features: यह एक सूची होती है. इसमें कलेक्शन में मौजूद सुविधाओं के बारे में मेटाडेटा होता है.

  - properties: यह एक ऐसी डिक्शनरी होती है जिसमें कलेक्शन के मेटाडेटा की प्रॉपर्टी होती हैं. हालांकि, यह ज़रूरी नहीं है.

इस्तेमालरिटर्न
FeatureCollection.getInfo(callback)FeatureCollectionDescription
आर्ग्यूमेंटटाइपविवरण
यह: featurecollectionFeatureCollectionFeatureCollection इंस्टेंस.
callbackफ़ंक्शन, ज़रूरी नहीं हैवैकल्पिक कॉलबैक. अगर यह पैरामीटर नहीं दिया जाता है, तो कॉल सिंक्रोनस तरीके से किया जाता है. अगर यह उपलब्ध कराया जाता है, तो लेन-देन पूरा होने पर इसे पहले पैरामीटर के साथ और पूरा न होने पर दूसरे पैरामीटर के साथ कॉल किया जाएगा.

उदाहरण

कोड एडिटर (JavaScript)

/**
 * WARNING: this function transfers data from Earth Engine servers to the
 * client. Doing so can negatively affect request processing and client
 * performance. Server-side options should be used whenever possible.
 * Learn more about the distinction between server and client:
 * https://developers.google.com/earth-engine/guides/client_server
 */

// A server-side ee.FeatureCollection of power plants in Belgium.
var fcServer = ee.FeatureCollection('WRI/GPPD/power_plants')
             .filter('country_lg == "Belgium"');

// Use getInfo to transfer server-side feature collection to the client. The
// result is an object.
var fcClient = fcServer.getInfo();
print('Client-side feature collection is an object', typeof fcClient);
print('Feature collection object keys', Object.keys(fcClient));
print('Array of features', fcClient.features);
print('Properties of first feature', fcClient.features[0].properties);

Python सेटअप करना

Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

"""WARNING: this function transfers data from Earth Engine servers to the
client. Doing so can negatively affect request processing and client
performance. Server-side options should be used whenever possible.
Learn more about the distinction between server and client:
https://developers.google.com/earth-engine/guides/client_server
"""

# A server-side ee.FeatureCollection of power plants in Belgium.
fc_server = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
    'country_lg == "Belgium"')

# Use getInfo to transfer server-side feature collection to the client. The
# result is an object.
fc_client = fc_server.getInfo()
print('Client-side feature collection is a dictionary:', type(fc_client))
print('Feature collection dictionary keys:', fc_client.keys())
print('Array of features:', fc_client['features'])
print('Properties of first feature:', fc_client['features'][0]['properties'])