একটি FeatureCollection এ সংরক্ষিত একাধিক অঞ্চলের চিত্র পরিসংখ্যান পেতে, আপনি একবারে একাধিক অঞ্চল কমাতে image.reduceRegions() ব্যবহার করতে পারেন। reduceRegions() ইনপুট হল একটি Image এবং একটি FeatureCollection । আউটপুট হল আরেকটি FeatureCollection যার সাথে reduceRegions() আউটপুট প্রতিটি Feature বৈশিষ্ট্য হিসেবে সেট করা আছে। এই উদাহরণে, প্রতিটি বৈশিষ্ট্য জ্যামিতিতে ল্যান্ডস্যাট 7 বার্ষিক যৌগিক ব্যান্ডের উপায়গুলি ইনপুট বৈশিষ্ট্যগুলিতে বৈশিষ্ট্য হিসাবে যুক্ত করা হবে:
কোড এডিটর (জাভাস্ক্রিপ্ট)
// Load input imagery: Landsat 7 5-year composite. var image = ee.Image('LANDSAT/LE7_TOA_5YEAR/2008_2012'); // Load a FeatureCollection of counties in Maine. var maineCounties = ee.FeatureCollection('TIGER/2016/Counties') .filter(ee.Filter.eq('STATEFP', '23')); // Add reducer output to the Features in the collection. var maineMeansFeatures = image.reduceRegions({ collection: maineCounties, reducer: ee.Reducer.mean(), scale: 30, }); // Print the first feature, to illustrate the result. print(ee.Feature(maineMeansFeatures.first()).select(image.bandNames()));
import ee import geemap.core as geemap
Colab (পাইথন)
# Load input imagery: Landsat 7 5-year composite. image = ee.Image('LANDSAT/LE7_TOA_5YEAR/2008_2012') # Load a FeatureCollection of counties in Maine. maine_counties = ee.FeatureCollection('TIGER/2016/Counties').filter( ee.Filter.eq('STATEFP', '23') ) # Add reducer output to the Features in the collection. maine_means_features = image.reduceRegions( collection=maine_counties, reducer=ee.Reducer.mean(), scale=30 ) # Print the first feature, to illustrate the result. display(ee.Feature(maine_means_features.first()).select(image.bandNames()))
লক্ষ্য করুন যে নতুন বৈশিষ্ট্যগুলি, ব্যান্ডের নাম দ্বারা চাবি করা, প্রতিটি Feature জ্যামিতিতে কম্পোজিটের গড় সংরক্ষণ করার জন্য FeatureCollection যোগ করা হয়েছে। ফলস্বরূপ, প্রিন্ট স্টেটমেন্টের আউটপুট দেখতে এমন কিছু হওয়া উচিত:
Feature (Polygon, 7 properties)
type: Feature
geometry: Polygon, 7864 vertices
properties: Object (7 properties)
B1: 24.034822192925134
B2: 19.40202233717122
B3: 13.568454303016292
B4: 63.00423784301736
B5: 29.142707062821305
B6_VCID_2: 186.18172376827042
B7: 12.064469664746415
একটি FeatureCollection এ সংরক্ষিত একাধিক অঞ্চলের চিত্র পরিসংখ্যান পেতে, আপনি একবারে একাধিক অঞ্চল কমাতে image.reduceRegions() ব্যবহার করতে পারেন। reduceRegions() ইনপুট হল একটি Image এবং একটি FeatureCollection । আউটপুট হল আরেকটি FeatureCollection যার সাথে reduceRegions() আউটপুট প্রতিটি Feature বৈশিষ্ট্য হিসেবে সেট করা আছে। এই উদাহরণে, প্রতিটি বৈশিষ্ট্য জ্যামিতিতে ল্যান্ডস্যাট 7 বার্ষিক যৌগিক ব্যান্ডের উপায়গুলি ইনপুট বৈশিষ্ট্যগুলিতে বৈশিষ্ট্য হিসাবে যুক্ত করা হবে:
কোড এডিটর (জাভাস্ক্রিপ্ট)
// Load input imagery: Landsat 7 5-year composite. var image = ee.Image('LANDSAT/LE7_TOA_5YEAR/2008_2012'); // Load a FeatureCollection of counties in Maine. var maineCounties = ee.FeatureCollection('TIGER/2016/Counties') .filter(ee.Filter.eq('STATEFP', '23')); // Add reducer output to the Features in the collection. var maineMeansFeatures = image.reduceRegions({ collection: maineCounties, reducer: ee.Reducer.mean(), scale: 30, }); // Print the first feature, to illustrate the result. print(ee.Feature(maineMeansFeatures.first()).select(image.bandNames()));
import ee import geemap.core as geemap
Colab (পাইথন)
# Load input imagery: Landsat 7 5-year composite. image = ee.Image('LANDSAT/LE7_TOA_5YEAR/2008_2012') # Load a FeatureCollection of counties in Maine. maine_counties = ee.FeatureCollection('TIGER/2016/Counties').filter( ee.Filter.eq('STATEFP', '23') ) # Add reducer output to the Features in the collection. maine_means_features = image.reduceRegions( collection=maine_counties, reducer=ee.Reducer.mean(), scale=30 ) # Print the first feature, to illustrate the result. display(ee.Feature(maine_means_features.first()).select(image.bandNames()))
লক্ষ্য করুন যে নতুন বৈশিষ্ট্যগুলি, ব্যান্ডের নাম দ্বারা চাবি করা, প্রতিটি Feature জ্যামিতিতে কম্পোজিটের গড় সংরক্ষণ করার জন্য FeatureCollection যোগ করা হয়েছে। ফলস্বরূপ, প্রিন্ট স্টেটমেন্টের আউটপুট দেখতে এমন কিছু হওয়া উচিত:
Feature (Polygon, 7 properties)
type: Feature
geometry: Polygon, 7864 vertices
properties: Object (7 properties)
B1: 24.034822192925134
B2: 19.40202233717122
B3: 13.568454303016292
B4: 63.00423784301736
B5: 29.142707062821305
B6_VCID_2: 186.18172376827042
B7: 12.064469664746415