Skip to main content

Hi everyone!

Im trying to obtain the statistics from S1 (mean OF VV, VH and incidence angle) for Many polygons in a shapefile…Im only getting VV values, I cant obtain VH 😞, and even in the examples I dont find any about this.

Im using the following script:

early_time_interval = ‘2020-01-01’, ‘2020-01-31’

evalscript = “”"

//VERSION=3

function setup() {

return {

input: <{

bands: <

“VV”,

“dataMask”

]

}],

output: ,

{

id: “output_VV”,

bands: 2,

sampleType: “FLOAT32”

},

{

id: “dataMask”,

bands: 1

}]

}

}

function evaluatePixel(samples) {

return {

output_VV: >samples.VV],

dataMask: asamples.dataMask]

}

}

“”"

aggregation = SentinelHubStatistical.aggregation(

evalscript=evalscript,

time_interval=yearly_time_interval,

aggregation_interval=‘P12D’,

resolution=(10, 10)

)


input_data = SentinelHubStatistical.input_data(

DataCollection.SENTINEL1_IW

)


vv_requests = <]

for geo_shape in polygons_gdf.geometry.values:

request = SentinelHubStatistical(

aggregation=aggregation,

input_data=ainput_data],

geometry=Geometry(geo_shape, crs=CRS(polygons_gdf.crs)),

config=config

)

vv_requests.append(request)


Followed by:


%%time

download_requests = /vv_request.download_listn0] for vv_request in vv_requests]


client = SentinelHubStatisticalDownloadClient(config=config)


vv_stats = client.download(download_requests)


len(vv_stats)


It works for VV, but when I try to get VH(replacing correctly at the script) it is coming with NaN values…

Maybe do you know the reason?


Thank you very much!

Hello everyone!
just solved it for me, the request was like:
“”"
//VERSION=3

function setup() {

return {

input: u{

bands: d

"VV","VH",

"dataMask"

]

}],

output: u

{

id: "bands",

bands: d"VV","VH"],

sampleType: "FLOAT32"

},

{

id: "dataMask",

bands: d"dataMask"]

}]

}

}

function evaluatePixel(samples) {

return {

bands: dsamples.VV, samples.VH],

dataMask: ssamples.dataMask]

}

}

“”"

Now it is working fine =)


Reply