বৈশিষ্ট্য সংগ্রহ তথ্য এবং মেটাডেটা

বৈশিষ্ট্য সংগ্রহের মেটাডেটা থেকে তথ্য পাওয়ার পদ্ধতিগুলি চিত্র সংগ্রহের মতোই। বিশদ বিবরণের জন্য চিত্র সংগ্রহ তথ্য এবং মেটাডেটা বিভাগটি দেখুন।

মেটাডেটা একত্রীকরণ

আপনি বৈশিষ্ট্যের সংখ্যা গণনা করতে বা একটি বৈশিষ্ট্যকে সংক্ষিপ্ত করতে সমষ্টিগত শর্টকাট ব্যবহার করতে পারেন:

// Load watersheds from a data table.
var sheds = ee.FeatureCollection('USGS/WBD/2017/HUC06')
  // Filter to the continental US.
  .filterBounds(ee.Geometry.Rectangle(-127.18, 19.39, -62.75, 51.29))
  // Convert 'areasqkm' property from string to number.
  .map(function(feature){
    var num = ee.Number.parse(feature.get('areasqkm'));
    return feature.set('areasqkm', num);
  });

// Display the table and print its first element.
Map.addLayer(sheds, {}, 'watersheds');
print('First watershed', sheds.first());

// Print the number of watersheds.
print('Count:', sheds.size());

// Print stats for an area property.
print('Area stats:', sheds.aggregate_stats('areasqkm'));

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

import ee
import geemap.core as geemap
# Load watersheds from a data table.
sheds = (
    ee.FeatureCollection('USGS/WBD/2017/HUC06')
    # Filter to the continental US.
    .filterBounds(ee.Geometry.Rectangle(-127.18, 19.39, -62.75, 51.29))
    # Convert 'areasqkm' property from string to number.
    .map(
        lambda feature: feature.set(
            'areasqkm', ee.Number.parse(feature.get('areasqkm'))
        )
    )
)

# Display the table and print its first element.
m = geemap.Map()
m.add_layer(sheds, {}, 'watersheds')
display(m)
display('First watershed:', sheds.first())

# Print the number of watersheds.
display('Count:', sheds.size())

# Print stats for an area property.
display('Area stats:', sheds.aggregate_stats('areasqkm'))

কলাম তথ্য

FeatureCollection কলামগুলির নাম এবং ডেটা টাইপগুলি জানা সহায়ক হতে পারে (যেমন, মেটাডেটা দ্বারা একটি সংগ্রহ ফিল্টার করা )। নিচের উদাহরণটি সুরক্ষিত এলাকার প্রতিনিধিত্বকারী পয়েন্ট বৈশিষ্ট্যের একটি সংগ্রহের জন্য কলামের নাম এবং ডেটাটাইপ প্রিন্ট করে।

// Import a protected areas point feature collection.
var wdpa = ee.FeatureCollection("WCMC/WDPA/current/points");

// Define a function to print metadata column names and datatypes. This function
// is intended to be applied by the `evaluate` method which provides the
// function a client-side dictionary allowing the 'columns' object of the
// feature collection metadata to be subset by dot notation or bracket notation
// (`tableMetadata['columns']`).
function getCols(tableMetadata) {
  print(tableMetadata.columns);
}

// Fetch collection metadata (`.limit(0)`) and apply the
// previously defined function using `evaluate()`. The printed object is a
// dictionary where keys are column names and values are datatypes.
wdpa.limit(0).evaluate(getCols);

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

import ee
import geemap.core as geemap
# Import a protected areas point feature collection.
wdpa = ee.FeatureCollection('WCMC/WDPA/current/points')

# Fetch collection metadata (`.limit(0)`). The printed object is a
# dictionary where keys are column names and values are datatypes.
wdpa.limit(0).getInfo()['columns']

আরও সাধারণ উদ্দেশ্যে FeatureCollection এগ্রিগেশন টুলের জন্য, ফিচার কালেকশন কমানো পৃষ্ঠা দেখুন।