ee.FeatureCollection.getInfo

একটি অপরিহার্য ফাংশন যা একটি AJAX কলের মাধ্যমে এই সংগ্রহ সম্পর্কে সমস্ত পরিচিত তথ্য প্রদান করে।

একটি সংগ্রহের বিবরণ প্রদান করে যার ক্ষেত্রগুলি অন্তর্ভুক্ত:

- বৈশিষ্ট্য: সংগ্রহের বৈশিষ্ট্য সম্পর্কে মেটাডেটা ধারণকারী একটি তালিকা।

- বৈশিষ্ট্য: সংগ্রহের মেটাডেটা বৈশিষ্ট্য ধারণকারী একটি ঐচ্ছিক অভিধান।

ব্যবহার রিটার্নস
FeatureCollection. getInfo ( callback ) বৈশিষ্ট্য সংগ্রহের বিবরণ
যুক্তি টাইপ বিস্তারিত
এই: featurecollection ফিচার কালেকশন ফিচার কালেকশনের উদাহরণ।
callback ফাংশন, ঐচ্ছিক একটি ঐচ্ছিক কলব্যাক। যদি সরবরাহ না করা হয়, কলটি সিঙ্ক্রোনাসভাবে করা হয়। যদি সরবরাহ করা হয়, সফল হলে প্রথম প্যারামিটার সহ কল করা হবে এবং ব্যর্থ হলে দ্বিতীয়টি।

উদাহরণ

কোড এডিটর (জাভাস্ক্রিপ্ট)

/**
 * 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);

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

"""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'])