공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.FeatureCollection.copyProperties
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
한 요소에서 다른 요소로 메타데이터 속성을 복사합니다.
사용 | 반환 값 |
---|
FeatureCollection.copyProperties(source, properties, exclude) | 요소 |
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: destination | 요소, 기본값: null | 속성을 재정의할 객체입니다. |
source | 요소, 기본값: null | 속성을 복사할 객체입니다. |
properties | 목록, 기본값: null | 복사할 속성입니다. 생략하면 모든 일반 (즉, 시스템이 아닌) 속성이 복사됩니다. |
exclude | 목록, 기본값: null | 모든 속성을 복사할 때 제외할 속성 목록입니다. 속성이 지정된 경우 지정하면 안 됩니다. |
예
코드 편집기 (JavaScript)
// Import a Landsat 8 surface reflectance image to sample.
var image = ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722')
// Select the optical bands.
.select(['SR_B.']);
// Get the image geometry to define the geographical bounds of the sample.
var imageBounds = image.geometry();
// Sample the image at a set of random points; a feature collection is returned.
var pointSampleFc = image.sample(
{region: imageBounds, scale: 30, numPixels: 5, geometries: true});
// Copy image properties to the FeatureCollection; three options follow.
print('All non-system image properties copied to the FeatureCollection',
pointSampleFc.copyProperties(image));
print('Selected image properties copied to the FeatureCollection',
pointSampleFc.copyProperties({
source: image,
properties: ['system:time_start', 'SPACECRAFT_ID']
}));
print('All but selected image properties copied to the FeatureCollection',
pointSampleFc.copyProperties({
source: image,
exclude: ['TIRS_SSM_MODEL', 'TIRS_SSM_POSITION_STATUS']
}));
Python 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
# Import a Landsat 8 surface reflectance image to sample.
image = ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722').select(
# Select the optical bands.
['SR_B.'])
# Get the image geometry to define the geographical bounds of the sample.
image_bounds = image.geometry()
# Sample the image at a set of random points; a feature collection is returned.
point_sample_fc = image.sample(
**{'region': image_bounds, 'scale': 30, 'numPixels': 5, 'geometries': True})
# Copy image properties to the FeatureCollection; three options follow.
print('All non-system image properties copied to the FeatureCollection:',
point_sample_fc.copyProperties(image).getInfo())
print('Selected image properties copied to the FeatureCollection:',
point_sample_fc.copyProperties(**{
'source': image,
'properties': ['system:time_start', 'SPACECRAFT_ID']
}).getInfo())
print('All but selected image properties copied to the FeatureCollection:',
point_sample_fc.copyProperties(**{
'source': image,
'exclude': ['TIRS_SSM_MODEL', 'TIRS_SSM_POSITION_STATUS']
}).getInfo())
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003ecopyProperties()\u003c/code\u003e transfers metadata properties from a source element to a destination element in Earth Engine.\u003c/p\u003e\n"],["\u003cp\u003eYou can copy all properties, a specified list of properties, or all properties except those in an exclusion list.\u003c/p\u003e\n"],["\u003cp\u003eThis function is useful for maintaining metadata consistency when manipulating Earth Engine objects, such as copying image metadata to a FeatureCollection derived from it.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns the modified destination element with the copied properties.\u003c/p\u003e\n"]]],[],null,["# ee.FeatureCollection.copyProperties\n\nCopies metadata properties from one element to another.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------------------------------------|---------|\n| FeatureCollection.copyProperties`(`*source* `, `*properties* `, `*exclude*`)` | Element |\n\n| Argument | Type | Details |\n|---------------------|------------------------|--------------------------------------------------------------------------------------------------------|\n| this: `destination` | Element, default: null | The object whose properties to override. |\n| `source` | Element, default: null | The object from which to copy the properties. |\n| `properties` | List, default: null | The properties to copy. If omitted, all ordinary (i.e. non-system) properties are copied. |\n| `exclude` | List, default: null | The list of properties to exclude when copying all properties. Must not be specified if properties is. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Import a Landsat 8 surface reflectance image to sample.\nvar image = ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722')\n // Select the optical bands.\n .select(['SR_B.']);\n\n// Get the image geometry to define the geographical bounds of the sample.\nvar imageBounds = image.geometry();\n\n// Sample the image at a set of random points; a feature collection is returned.\nvar pointSampleFc = image.sample(\n {region: imageBounds, scale: 30, numPixels: 5, geometries: true});\n\n// Copy image properties to the FeatureCollection; three options follow.\nprint('All non-system image properties copied to the FeatureCollection',\n pointSampleFc.copyProperties(image));\n\nprint('Selected image properties copied to the FeatureCollection',\n pointSampleFc.copyProperties({\n source: image,\n properties: ['system:time_start', 'SPACECRAFT_ID']\n }));\n\nprint('All but selected image properties copied to the FeatureCollection',\n pointSampleFc.copyProperties({\n source: image,\n exclude: ['TIRS_SSM_MODEL', 'TIRS_SSM_POSITION_STATUS']\n }));\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Import a Landsat 8 surface reflectance image to sample.\nimage = ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722').select(\n # Select the optical bands.\n ['SR_B.'])\n\n# Get the image geometry to define the geographical bounds of the sample.\nimage_bounds = image.geometry()\n\n# Sample the image at a set of random points; a feature collection is returned.\npoint_sample_fc = image.sample(\n **{'region': image_bounds, 'scale': 30, 'numPixels': 5, 'geometries': True})\n\n# Copy image properties to the FeatureCollection; three options follow.\nprint('All non-system image properties copied to the FeatureCollection:',\n point_sample_fc.copyProperties(image).getInfo())\n\nprint('Selected image properties copied to the FeatureCollection:',\n point_sample_fc.copyProperties(**{\n 'source': image,\n 'properties': ['system:time_start', 'SPACECRAFT_ID']\n }).getInfo())\n\nprint('All but selected image properties copied to the FeatureCollection:',\n point_sample_fc.copyProperties(**{\n 'source': image,\n 'exclude': ['TIRS_SSM_MODEL', 'TIRS_SSM_POSITION_STATUS']\n }).getInfo())\n```"]]