Skip to main content

Hello,

Currently we are using the process api to retrieve images from our polygons.

For larger polygons (> 500ha) the resolution is good, we are using 1000px x 1000px. (width and height)

But when the polygon is small the resolution is very bad.

Is there any workaround to acquire best images for small polygons ?

Used payload

{
"input":{
"bounds":{
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/4326"
},
"geometry":{
"type":"Polygon",
"coordinates":[
[
[
-51.0705149173781,
-23.2945561408997
],
[
-51.0683262348175,
-23.294792175293
],
[
-51.0701501369476,
-23.288140296936
],
[
-51.0706865787506,
-23.2888913154602
],
[
-51.0710299015045,
-23.289749622345
],
[
-51.071501970291972,
-23.2906079292297
],
[
-51.0718023777008,
-23.2909083366394
],
[
-51.0705149173781,
-23.2945561408997
]
]
]
}

},
"data":[
{
"type":"S2L1C",
"dataFilter":{
"timeRange":{
"from":"2020-01-18T00:00:00Z",
"to":"2020-01-18T23:59:59Z"
}
}
}
]
},
"output":{
"width": 1000,
"height": 1000,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/png",
"quality": 100
}
}
]
},
"evalscript":"function setup(){return{input:[\"B08\",\"B04\",\"B02\",\"dataMask\"],output:{bands:4}}}function evaluatePixel(t){let a=(t.B08-t.B04)/(t.B08+t.B04);return 1==t.dataMask?colorBlend(a,[-.2,0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],[[0,0,0,1],[165/255,0,38/255,1],[215/255,48/255,39/255,1],[244/255,109/255,67/255,1],[253/255,174/255,97/255,1],[254/255,224/255,139/255,1],[1,1,191/255,1],[217/255,239/255,139/255,1],[166/255,217/255,106/255,1],[.4,189/255,99/255,1],[26/255,152/255,80/255,1],[0,104/255,55/255,1]]):[99,99,99,0]}"
}

Image of response

 

Regards

 

What you are probably noticing is a limitation of 10 meters resolution. E.g. each pixel you see is 10x10 meters, in line with the sensor capabilities.


You can use upsampling (I suggest bicubic) - note that this does not actually improve resolution, it simply interpolates between pixel values to produce a nicer-looking result.


On another note - make sure that width and height used are proportional to actual width/height of the polygon. E.g. if a polygon has a 3-1 ratio (width/height), you should put width = 1000, height = 333.


Reply