Я пытаюсь получить информацию об изображении, состоянии облаков, угле солнца и любую другую информацию, которую я могу получить.
Я пытаюсь получить метаданные на картинках ..
Чтобы проиллюстрировать это, я использую CLOUD_COVER для процента облачности, но не получаю никакого числового значения.
Мой код:
import ee
import ee.mapclient
ee.Initialize()
# Get a download URL for an image.
image1 = ee.Image('COPERNICUS/S2_SR/20190205T082129_20190205T082130_T36SYB');
#Get information about the bands as a list.
bandNames = image1.bandNames();
print ("Band names: " + str(bandNames)) #ee.List of band names
#Get projection information from band 1
b1proj = image1.select('B1').projection()
print('Band 1 projection: ' + str(b1proj))#ee.Projection object
#Get scale (in meters) information from band 1.
b1scale = image1.select('B1').projection().nominalScale()
print('Band 1 scale: ' + str(b1scale))#ee.Number
#Note that different bands can have different projections and scale.
b8scale = image1.select('B8').projection().nominalScale()
print('Band 8 scale: ' + str(b8scale))#ee.Number
#Get a list of all metadata properties.
properties = image1.propertyNames()
print('Metadata properties: ' + str(properties))#ee.List of metadata properties
#Get a specific metadata property.
cloudiness = image1.get('CLOUD_COVER')
print('CLOUD_COVER: ' + str(cloudiness))#ee.Number
Вот вывод:
Band names: ee.List({
"type": "Invocation",
"arguments": {
"image": {
"type": "Invocation",
"arguments": {
"id": "COPERNICUS/S2_SR/20190205T082129_20190205T082130_T36SYB"
},
"functionName": "Image.load"
}
},
"functionName": "Image.bandNames"
})
Band 1 projection: ee.Projection({
"type": "Invocation",
"arguments": {
"crs": {
"type": "Invocation",
"arguments": {
"image": {
"type": "Invocation",
"arguments": {
"bandSelectors": [
"B1"
],
"input": {
"type": "Invocation",
"arguments": {
"id": "COPERNICUS/S2_SR/20190205T082129_20190205T082130_T36SYB"
},
"functionName": "Image.load"
}
},
"functionName": "Image.select"
}
},
"functionName": "Image.projection"
}
},
"functionName": "Projection"
})
Band 1 scale: ee.Number({
"type": "Invocation",
"arguments": {
"proj": {
"type": "Invocation",
"arguments": {
"crs": {
"type": "Invocation",
"arguments": {
"image": {
"type": "Invocation",
"arguments": {
"bandSelectors": [
"B1"
],
"input": {
"type": "Invocation",
"arguments": {
"id": "COPERNICUS/S2_SR/20190205T082129_20190205T082130_T36SYB"
},
"functionName": "Image.load"
}
},
"functionName": "Image.select"
}
},
"functionName": "Image.projection"
}
},
"functionName": "Projection"
}
},
"functionName": "Projection.nominalScale"
})
Band 8 scale: ee.Number({
"type": "Invocation",
"arguments": {
"proj": {
"type": "Invocation",
"arguments": {
"crs": {
"type": "Invocation",
"arguments": {
"image": {
"type": "Invocation",
"arguments": {
"bandSelectors": [
"B8"
],
"input": {
"type": "Invocation",
"arguments": {
"id": "COPERNICUS/S2_SR/20190205T082129_20190205T082130_T36SYB"
},
"functionName": "Image.load"
}
},
"functionName": "Image.select"
}
},
"functionName": "Image.projection"
}
},
"functionName": "Projection"
}
},
"functionName": "Projection.nominalScale"
})
Metadata properties: ee.List({
"type": "Invocation",
"arguments": {
"element": {
"type": "Invocation",
"arguments": {
"id": "COPERNICUS/S2_SR/20190205T082129_20190205T082130_T36SYB"
},
"functionName": "Image.load"
}
},
"functionName": "Element.propertyNames"
})
CLOUD_COVER: ee.ComputedObject({
"type": "Invocation",
"arguments": {
"property": "CLOUD_COVER",
"object": {
"type": "Invocation",
"arguments": {
"id": "COPERNICUS/S2_SR/20190205T082129_20190205T082130_T36SYB"
},
"functionName": "Image.load"
}
},
"functionName": "Element.get"
})
Проблема в том, что на выходе нет информации. Кто-нибудь может объяснить, почему?