ee.FeatureCollection.copyProperties

এক উপাদান থেকে অন্য উপাদানে মেটাডেটা বৈশিষ্ট্য কপি করে।

ব্যবহার রিটার্নস
FeatureCollection. copyProperties ( source , properties , exclude ) উপাদান
যুক্তি টাইপ বিস্তারিত
এই: destination উপাদান, ডিফল্ট: নাল যে বস্তুর বৈশিষ্ট্য ওভাররাইড করতে হবে।
source উপাদান, ডিফল্ট: নাল যে বস্তু থেকে বৈশিষ্ট্য অনুলিপি করতে হবে।
properties তালিকা, ডিফল্ট: নাল কপি করার বৈশিষ্ট্য। বাদ দেওয়া হলে, সমস্ত সাধারণ (অর্থাৎ অ-সিস্টেম) বৈশিষ্ট্য অনুলিপি করা হয়।
exclude তালিকা, ডিফল্ট: নাল সমস্ত বৈশিষ্ট্য অনুলিপি করার সময় বাদ দেওয়া বৈশিষ্ট্যগুলির তালিকা৷ বৈশিষ্ট্য থাকলে নির্দিষ্ট করা উচিত নয়।

উদাহরণ

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

// 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']
      }));

পাইথন সেটআপ

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

import ee
import geemap.core as geemap

Colab (পাইথন)

# 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())