सुझाव भेजें
ee.ImageCollection.max
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, इमेज कलेक्शन को छोटा करता है. इसके लिए, यह मैच करने वाले सभी बैंड के स्टैक में मौजूद हर पिक्सल की ज़्यादा से ज़्यादा वैल्यू का हिसाब लगाता है. बैंड का मिलान नाम के हिसाब से किया जाता है.
इस्तेमाल रिटर्न ImageCollection. max ()
इमेज
आर्ग्यूमेंट टाइप विवरण यह: collection
ImageCollection कम की जाने वाली इमेज का कलेक्शन.
उदाहरण
कोड एडिटर (JavaScript)
// Sentinel-2 image collection for July 2021 intersecting a point of interest.
// Reflectance, cloud probability, and scene classification bands are selected.
var col = ee . ImageCollection ( 'COPERNICUS/S2_SR' )
. filterDate ( '2021-07-01' , '2021-08-01' )
. filterBounds ( ee . Geometry . Point ( - 122.373 , 37.448 ))
. select ( 'B.*|MSK_CLDPRB|SCL' );
// Visualization parameters for reflectance RGB.
var visRefl = {
bands : [ 'B11' , 'B8' , 'B3' ],
min : 0 ,
max : 4000
};
Map . setCenter ( - 122.373 , 37.448 , 9 );
Map . addLayer ( col , visRefl , 'Collection reference' , false );
// Reduce the collection to a single image using a variety of methods.
var mean = col . mean ();
Map . addLayer ( mean , visRefl , 'Mean (B11, B8, B3)' );
var median = col . median ();
Map . addLayer ( median , visRefl , 'Median (B11, B8, B3)' );
var min = col . min ();
Map . addLayer ( min , visRefl , 'Min (B11, B8, B3)' );
var max = col . max ();
Map . addLayer ( max , visRefl , 'Max (B11, B8, B3)' );
var sum = col . sum ();
Map . addLayer ( sum ,
{ bands : [ 'MSK_CLDPRB' ], min : 0 , max : 500 }, 'Sum (MSK_CLDPRB)' );
var product = col . product ();
Map . addLayer ( product ,
{ bands : [ 'MSK_CLDPRB' ], min : 0 , max : 1e10 }, 'Product (MSK_CLDPRB)' );
// ee.ImageCollection.mode returns the most common value. If multiple mode
// values occur, the minimum mode value is returned.
var mode = col . mode ();
Map . addLayer ( mode , { bands : [ 'SCL' ], min : 1 , max : 11 }, 'Mode (pixel class)' );
// ee.ImageCollection.count returns the frequency of valid observations. Here,
// image pixels are masked based on cloud probability to add valid observation
// variability to the collection. Note that pixels with no valid observations
// are masked out of the returned image.
var notCloudCol = col . map ( function ( img ) {
return img . updateMask ( img . select ( 'MSK_CLDPRB' ). lte ( 10 ));
});
var count = notCloudCol . count ();
Map . addLayer ( count , { min : 1 , max : 5 }, 'Count (not cloud observations)' );
// ee.ImageCollection.mosaic composites images according to their position in
// the collection (priority is last to first) and pixel mask status, where
// invalid (mask value 0) pixels are filled by preceding valid (mask value >0)
// pixels.
var mosaic = notCloudCol . mosaic ();
Map . addLayer ( mosaic , visRefl , 'Mosaic (B11, B8, B3)' );
Python सेटअप करना
Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap
का इस्तेमाल करने के बारे में जानकारी पाने के लिए,
Python एनवायरमेंट पेज देखें.
import ee
import geemap.core as geemap
Colab (Python)
# Sentinel-2 image collection for July 2021 intersecting a point of interest.
# Reflectance, cloud probability, and scene classification bands are selected.
col = (
ee . ImageCollection ( 'COPERNICUS/S2_SR' )
. filterDate ( '2021-07-01' , '2021-08-01' )
. filterBounds ( ee . Geometry . Point ( - 122.373 , 37.448 ))
. select ( 'B.*|MSK_CLDPRB|SCL' )
)
# Visualization parameters for reflectance RGB.
vis_refl = { 'bands' : [ 'B11' , 'B8' , 'B3' ], 'min' : 0 , 'max' : 4000 }
m = geemap . Map ()
m . set_center ( - 122.373 , 37.448 , 9 )
m . add_layer ( col , vis_refl , 'Collection reference' , False )
# Reduce the collection to a single image using a variety of methods.
mean = col . mean ()
m . add_layer ( mean , vis_refl , 'Mean (B11, B8, B3)' )
median = col . median ()
m . add_layer ( median , vis_refl , 'Median (B11, B8, B3)' )
min = col . min ()
m . add_layer ( min , vis_refl , 'Min (B11, B8, B3)' )
max = col . max ()
m . add_layer ( max , vis_refl , 'Max (B11, B8, B3)' )
sum = col . sum ()
m . add_layer (
sum , { 'bands' : [ 'MSK_CLDPRB' ], 'min' : 0 , 'max' : 500 }, 'Sum (MSK_CLDPRB)'
)
product = col . product ()
m . add_layer (
product ,
{ 'bands' : [ 'MSK_CLDPRB' ], 'min' : 0 , 'max' : 1e10 },
'Product (MSK_CLDPRB)' ,
)
# ee.ImageCollection.mode returns the most common value. If multiple mode
# values occur, the minimum mode value is returned.
mode = col . mode ()
m . add_layer (
mode , { 'bands' : [ 'SCL' ], 'min' : 1 , 'max' : 11 }, 'Mode (pixel class)'
)
# ee.ImageCollection.count returns the frequency of valid observations. Here,
# image pixels are masked based on cloud probability to add valid observation
# variability to the collection. Note that pixels with no valid observations
# are masked out of the returned image.
not_cloud_col = col . map (
lambda img : img . updateMask ( img . select ( 'MSK_CLDPRB' ) . lte ( 10 ))
)
count = not_cloud_col . count ()
m . add_layer ( count , { 'min' : 1 , 'max' : 5 }, 'Count (not cloud observations)' )
# ee.ImageCollection.mosaic composites images according to their position in
# the collection (priority is last to first) and pixel mask status, where
# invalid (mask value 0) pixels are filled by preceding valid (mask value >0)
# pixels.
mosaic = not_cloud_col . mosaic ()
m . add_layer ( mosaic , vis_refl , 'Mosaic (B11, B8, B3)' )
m
सुझाव भेजें
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
क्या आपको हमें और कुछ बताना है?
[[["समझने में आसान है","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-26 (UTC) को अपडेट किया गया."],[[["`ImageCollection.max()` reduces an image collection to a single image by calculating the maximum pixel value across all images in the collection for each band."],["Bands with matching names are compared pixel-wise to determine the maximum value."],["The result is a single image containing the maximum values for each band across the collection."],["This method is useful for creating composite images or identifying the highest values in a time series."]]],[]]