ee.FeatureCollection.getInfo

یک تابع ضروری که تمام اطلاعات شناخته شده در مورد این مجموعه را از طریق یک فراخوانی AJAX برمی گرداند.

شرح مجموعه ای را برمی گرداند که فیلدهای آن عبارتند از:

- ویژگی ها: فهرستی حاوی فراداده در مورد ویژگی های مجموعه.

- خواص: یک فرهنگ لغت اختیاری حاوی ویژگی های ابرداده مجموعه.

استفاده برمی گرداند
FeatureCollection. getInfo ( callback ) FeatureCollectionDescription
استدلال تایپ کنید جزئیات
این: featurecollection مجموعه ویژگی ها نمونه 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);

راه اندازی پایتون

برای اطلاعات در مورد API پایتون و استفاده از geemap برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.

import ee
import geemap.core as geemap

کولب (پایتون)

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