ارسال بازخورد
ee.FeatureCollection.copyProperties
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
ویژگی های ابرداده را از یک عنصر به عنصر دیگر کپی می کند.
استفاده برمی گرداند FeatureCollection. copyProperties ( source , properties , exclude )
عنصر
استدلال تایپ کنید جزئیات این: destination
عنصر، پیش فرض: null شیئی که خواص آن نادیده گرفته شود. source
عنصر، پیش فرض: null شیئی که از آن خواص کپی می شود. properties
لیست، پیش فرض: null خواص برای کپی کردن اگر حذف شود، تمام خصوصیات معمولی (یعنی غیر سیستمی) کپی می شوند. exclude
لیست، پیش فرض: null لیست ویژگی هایی که باید هنگام کپی کردن همه ویژگی ها حذف شوند. در صورت وجود ویژگی، نباید مشخص شود.
نمونه ها ویرایشگر کد (جاوا اسکریپت)
// 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' ]
})); راه اندازی پایتون
برای اطلاعات در مورد API پایتون و استفاده از geemap
برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.
import ee
import geemap.core as geemap کولب (پایتون)
# 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 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
میخواهید موارد بیشتری را با ما درمیان بگذارید؟
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["`copyProperties()` transfers metadata properties from a source element to a destination element in Earth Engine."],["You can copy all properties, a specified list of properties, or all properties except those in an exclusion list."],["This function is useful for maintaining metadata consistency when manipulating Earth Engine objects, such as copying image metadata to a FeatureCollection derived from it."],["The function returns the modified destination element with the copied properties."]]],[]]