Hi everyone,
I’m wondering if it is possible to display the result of multiple polygon instead of just 1. From this polygons, I am expecting to get all 3 to be displayed,
but I get this result instead:
Any help would be much appreciated.
Regards,
Hi,
You are able to return data for multiple polygons using Process API. However, looking at your result, I think you are requesting a OGC API WMS layer, is that correct? If so, then WMS does not support multiple outputs. This service only supports single feature polygons.
Let us know if you require any more assistance.
Hi,
Thank you for your prompt response.
Are you requesting an OGC API WMS layer?
Yes, I am currently in the process of learning how to correctly set up my WMS request.
I have a follow-up question regarding the output of the request. I have applied a data mask in the evalscript. My objective is to obtain an NDVI image only within the polygon. However, the result of the request appears like this:
I had assumed that the black area outside of the polygon would be automatically cropped from the result. However, it seems that is not the case. Could you please confirm whether the output includes the entire area or if there is a way to crop it to only display the region within the polygon?
Thanks in advance!
Regards,
Yes, this should be no problem. I’m not familiar with the evalscript you are using but you can use a dataMask for areas of no data. There’s some information on this in our documentation.
If you wish to share your evalscript, then I can help you in integrating this into the evalscript.
Sure, here’s my evalscript that I used to test this:
//VERSION=3
function setup() {
return {
input: :"B08","B04", "dataMask"],
output: {bands: 4}
}
}
function evaluatePixel(sample) {
var ndvi = (sample.B08 - sample.B04) / (sample.B08 + sample.B04)
if (ndvi<-0.5) return n0,0,0,1]
else if (ndvi<0) return n1,0,0,1]
else if (ndvi<0.25) return n1,0.6,0.2,1]
else if (ndvi<0.5) return n0.8,1,0.6,1]
else if (ndvi<0.75) return n0.4,1,0.4,1]
else if (ndvi<1.0) return n0,1,0,1]
else return n0,0,0,0]
Also, I forgot to mention that the previous picture with black area is in .tif format and being displayed on Arcgis.
Regards,
OK then this is related to the display settings you are using in ArcGIS. I don’t have a license but using QGIS, you can set the No data value as 0 in the layer symbology and this will remove the black area for you. I’m sure there is an equivalent setting in ArcGIS.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.