//VERSION=3//Author: Monja B. Šebelafunctionsetup(){return{input:[{datasource:"S2L1C",bands:["B02","B03","B04","B08","B11"]},{datasource:"S1GRD",bands:["VV","VH"],orthorectify:"TRUE"},{datasource:"S2L2A",bands:["B02","B03","B04"]}],output:[{id:"default",bands:3}]};}functionevaluatePixel(samples){varS2L1C=samples.S2L1C[0]varS2L2A=samples.S2L2A[0]varS1=samples.S1GRD[0]letndvi=(S2L1C.B08-S2L1C.B04)/(S2L1C.B08+S2L1C.B04)letndmi=(S2L1C.B08-S2L1C.B11)/(S2L1C.B08+S2L1C.B11)if(ndvi>0.5){return{default:[3*S2L2A.B04,3*S2L2A.B03,3*S2L2A.B02]}}if(ndmi>0){return{default:[3*S2L2A.B04,3*S2L2A.B03,4*S2L2A.B02]}}if((S1.VH>0.2)||(S1.VV>0.2)){return{default:[S1.VH*5.5,S1.VV,S1.VH*8]}}return{default:[3*S2L1C.B04-0.2,3*S2L1C.B03-0.2,3*S2L1C.B02-0.2]}}
This script is based on the Urban areas composite for Sentinel-1. The script displayes highly reflective VV and VH pixels as built up, limiting them by using basic vegetation and water masking with Sentinel-2. It is prone to overestimation over high slope areas and barren rock.