File tree 2 files changed +76
-0
lines changed
sentinel-3/OLCI_level_2_land/GIFAPAR_color
2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title :
3
+ parent : OLCI_level_2_land
4
+ grandparent : sentinel-3
5
+ layout : script
6
+ nav_exclude : true
7
+ examples :
8
+ - zoom : ' 9'
9
+ lat : ' 46.76527'
10
+ lng : ' 17.81158'
11
+ datasetId : S3OLCI_GIFAPAR
12
+ fromTime : ' 2024-09-03T00:00:00.000Z'
13
+ toTime : ' 2024-09-03T23:59:59.999Z'
14
+ platform :
15
+ - CDSE
16
+ evalscripturl : https://custom-scripts.sentinel-hub.com/custom-script/ssentinel-3/OLCI_level_2_land/GIFAPAR_color/script.js
17
+ ---
18
+
19
+
20
+ ## General description of the script
21
+
22
+ This is a simple visualization of GIFAPAR with a green palette. GIFAPAR has values between zero and one
23
+
24
+
Original file line number Diff line number Diff line change
1
+ //Version=3
2
+ // Simple green color ramp for GIFAPAR index
3
+ // By András Zlinszky, Sinergise - with lots of help from GitHub Copilot
4
+
5
+ function setup ( ) {
6
+ return {
7
+ input : [ "GIFAPAR" , "dataMask" ] ,
8
+ output : [
9
+ { id : "default" , bands : 4 } ,
10
+ { id : "index" , bands : 1 , sampleType : "FLOAT32" } ,
11
+ { id : "eobrowserStats" , bands : 1 , sampleType : "FLOAT32" } ,
12
+ { id : "dataMask" , bands : 1 }
13
+ ]
14
+ } ;
15
+ }
16
+
17
+ const ramp = [
18
+ [ - 0.5 , 0x0c0c0c ] ,
19
+ [ - 0.2 , 0xbfbfbf ] ,
20
+ [ - 0.1 , 0xdbdbdb ] ,
21
+ [ 0 , 0xeaeaea ] ,
22
+ [ 0.025 , 0xfff9cc ] ,
23
+ [ 0.05 , 0xede8b5 ] ,
24
+ [ 0.075 , 0xddd89b ] ,
25
+ [ 0.1 , 0xccc682 ] ,
26
+ [ 0.125 , 0xbcb76b ] ,
27
+ [ 0.15 , 0xafc160 ] ,
28
+ [ 0.175 , 0xa3cc59 ] ,
29
+ [ 0.2 , 0x91bf51 ] ,
30
+ [ 0.25 , 0x7fb247 ] ,
31
+ [ 0.3 , 0x70a33f ] ,
32
+ [ 0.35 , 0x609635 ] ,
33
+ [ 0.4 , 0x4f892d ] ,
34
+ [ 0.45 , 0x3f7c23 ] ,
35
+ [ 0.5 , 0x306d1c ] ,
36
+ [ 0.55 , 0x216011 ] ,
37
+ [ 0.6 , 0x0f540a ] ,
38
+ [ 1 , 0x004400 ]
39
+ ] ;
40
+
41
+ let viz = new ColorRampVisualizer ( ramp ) ;
42
+
43
+ function evaluatePixel ( sample ) {
44
+ let val = sample . GIFAPAR ;
45
+ let ImgVals = viz . process ( val ) ;
46
+ return {
47
+ default : ImgVals . concat ( sample . dataMask ) ,
48
+ index : [ sample . dataMask == 1 ? sample . GIFAPAR : NaN ] ,
49
+ eobrowserStats : [ sample . dataMask == 1 ? sample . GIFAPAR : NaN ] ,
50
+ dataMask : [ sample . dataMask ]
51
+ } ;
52
+ }
You can’t perform that action at this time.
0 commit comments