ইমেজ কালেকশন ওভারভিউ

একটি ImageCollection হল ছবির একটি স্ট্যাক বা ক্রম। ImageCollection কনস্ট্রাক্টরে একটি আর্থ ইঞ্জিন অ্যাসেট আইডি পেস্ট করে একটি ImageCollection লোড করা যেতে পারে। আপনি ডেটা ক্যাটালগে ImageCollection আইডি খুঁজে পেতে পারেন। উদাহরণস্বরূপ, সেন্টিনেল -2 পৃষ্ঠের প্রতিফলন সংগ্রহ লোড করতে:

var sentinelCollection = ee.ImageCollection('COPERNICUS/S2_SR');

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

import ee
import geemap.core as geemap
sentinel_collection = ee.ImageCollection('COPERNICUS/S2_SR')

এই সংগ্রহে পাবলিক ক্যাটালগের প্রতিটি সেন্টিনেল-2 চিত্র রয়েছে। অনেক আছে. সাধারণত আপনি এখানে বা এখানে দেখানো হিসাবে সংগ্রহ ফিল্টার করতে চান।

আর্থ ইঞ্জিন কালেকশন আইডি ব্যবহার করে একটি ImageCollection লোড করার পাশাপাশি, আর্থ ইঞ্জিনে ইমেজ সংগ্রহ তৈরি করার পদ্ধতি রয়েছে। কনস্ট্রাক্টর ee.ImageCollection() বা সুবিধার পদ্ধতি ee.ImageCollection.fromImages() ছবির তালিকা থেকে ছবি সংগ্রহ তৈরি করে। আপনি বিদ্যমান সংগ্রহগুলিকে একত্রিত করে নতুন চিত্র সংগ্রহও তৈরি করতে পারেন। যেমন:

// Create arbitrary constant images.
var constant1 = ee.Image(1);
var constant2 = ee.Image(2);

// Create a collection by giving a list to the constructor.
var collectionFromConstructor = ee.ImageCollection([constant1, constant2]);
print('collectionFromConstructor: ', collectionFromConstructor);

// Create a collection with fromImages().
var collectionFromImages = ee.ImageCollection.fromImages(
  [ee.Image(3), ee.Image(4)]);
print('collectionFromImages: ', collectionFromImages);

// Merge two collections.
var mergedCollection = collectionFromConstructor.merge(collectionFromImages);
print('mergedCollection: ', mergedCollection);

// Create a toy FeatureCollection
var features = ee.FeatureCollection(
  [ee.Feature(null, {foo: 1}), ee.Feature(null, {foo: 2})]);

// Create an ImageCollection from the FeatureCollection
// by mapping a function over the FeatureCollection.
var images = features.map(function(feature) {
  return ee.Image(ee.Number(feature.get('foo')));
});

// Print the resultant collection.
print('Image collection: ', images);

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

import ee
import geemap.core as geemap
# Create arbitrary constant images.
constant_1 = ee.Image(1)
constant_2 = ee.Image(2)

# Create a collection by giving a list to the constructor.
collection_from_constructor = ee.ImageCollection([constant_1, constant_2])
display('Collection from constructor:', collection_from_constructor)

# Create a collection with fromImages().
collection_from_images = ee.ImageCollection.fromImages(
    [ee.Image(3), ee.Image(4)]
)
display('Collection from images:', collection_from_images)

# Merge two collections.
merged_collection = collection_from_constructor.merge(collection_from_images)
display('Merged collection:', merged_collection)

# Create a toy FeatureCollection
features = ee.FeatureCollection(
    [ee.Feature(None, {'foo': 1}), ee.Feature(None, {'foo': 2})]
)

# Create an ImageCollection from the FeatureCollection
# by mapping a function over the FeatureCollection.
images = features.map(lambda feature: ee.Image(ee.Number(feature.get('foo'))))

# Display the resultant collection.
display('Image collection:', images)

মনে রাখবেন যে এই উদাহরণে একটি ImageCollection একটি ফাংশন ম্যাপ করে তৈরি করা হয়েছে যা একটি FeatureCollection উপর একটি Image প্রদান করে। ম্যাপিং ওভার একটি ইমেজ কালেকশন বিভাগে ম্যাপিং সম্পর্কে আরও জানুন। ফিচার কালেকশন বিভাগ থেকে বৈশিষ্ট্য সংগ্রহ সম্পর্কে আরও জানুন।

আপনি ক্লাউড স্টোরেজে জিওটিফস থেকে একটি ImageCollection তৈরি করতে পারেন। যেমন:

// All the GeoTiffs are in this folder.
var uriBase = 'gs://gcp-public-data-landsat/LC08/01/001/002/' +
    'LC08_L1GT_001002_20160817_20170322_01_T2/';

// List of URIs, one for each band.
var uris = ee.List([
  uriBase + 'LC08_L1GT_001002_20160817_20170322_01_T2_B2.TIF',
  uriBase + 'LC08_L1GT_001002_20160817_20170322_01_T2_B3.TIF',
  uriBase + 'LC08_L1GT_001002_20160817_20170322_01_T2_B4.TIF',
  uriBase + 'LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF',
]);

// Make a collection from the list of images.
var images = uris.map(ee.Image.loadGeoTIFF);
var collection = ee.ImageCollection(images);

// Get an RGB image from the collection of bands.
var rgb = collection.toBands().rename(['B2', 'B3', 'B4', 'B5']);
Map.centerObject(rgb);
Map.addLayer(rgb, {bands: ['B4', 'B3', 'B2'], min: 0, max: 20000}, 'rgb');

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

import ee
import geemap.core as geemap
# All the GeoTiffs are in this folder.
uri_base = (
    'gs://gcp-public-data-landsat/LC08/01/001/002/'
    + 'LC08_L1GT_001002_20160817_20170322_01_T2/'
)

# List of URIs, one for each band.
uris = ee.List([
    uri_base + 'LC08_L1GT_001002_20160817_20170322_01_T2_B2.TIF',
    uri_base + 'LC08_L1GT_001002_20160817_20170322_01_T2_B3.TIF',
    uri_base + 'LC08_L1GT_001002_20160817_20170322_01_T2_B4.TIF',
    uri_base + 'LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF',
])

# Make a collection from the list of images.
images = uris.map(lambda uri: ee.Image.loadGeoTIFF(uri))
collection = ee.ImageCollection(images)

# Get an RGB image from the collection of bands.
rgb = collection.toBands().rename(['B2', 'B3', 'B4', 'B5'])
m = geemap.Map()
m.center_object(rgb)
m.add_layer(rgb, {'bands': ['B4', 'B3', 'B2'], 'min': 0, 'max': 20000}, 'rgb')
m

ক্লাউড জিওটিফস থেকে ছবি লোড করার বিষয়ে আরও জানুন