필드에 다음이 포함된 컬렉션 설명을 반환합니다.
- features: 컬렉션의 기능에 관한 메타데이터가 포함된 목록입니다.
- properties: 컬렉션의 메타데이터 속성을 포함하는 선택적 사전입니다.
사용 | 반환 값 |
---|---|
FeatureCollection.getInfo(callback) | FeatureCollectionDescription |
인수 | 유형 | 세부정보 |
---|---|---|
다음과 같은 경우: featurecollection | FeatureCollection | FeatureCollection 인스턴스입니다. |
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);
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'])