Examples for S1GRD

To request data using any of the request below, you will need to replace the string <your access token> with your Sentinel Hub access token. Sentinel Hub access token will look something like this:

ayJhbGciOiJSUzI1NiJ9.ayJzdWIiOiI0MmYwODZjCy1kMzI3LTRlOTMtYWMxNS00ODAwOGFiZjI0YjIiLCJhdWQiOiJlY2I1MGM1Zi1i
MWM1LTQ3ZTgtYWE4NC0zZTU4NzJlM2I2MTEiLCJqdGkiOiI5MzYxMWE4ODEyNTM4Y2M0MmU0NDJjYjUyMTY0YmJlNyIsImV4cCI6MTU1N
TQyMzk3MiwibmFtZSI6ImFuamEudnJlY2tvQHNpbmVyZ2lzZS5jb20iLCJlbWFpbCI6ImFuamEudnJlY2tvQHNpbmVyZ2lzZS5jb20iLC
JzaWQiOiIzZjVjZDVkNS04MjRiLTQ3ZjYtODgwNy0wNDMyNWY4ODQxZmQifQ.U7FPOy_2jlEOFxXSjyN5KEdBROna3-Dyec0feShIbUOY
1p9lEXdNaMmR5euiINi2RXDayX9Kr47CuSTsvq1zHFvZs1YgkFr1iH6kDuX-t_-wfWpqu5oPjoPVKZ4Rj0Ms_dxAUTQFTXR0rlbLuO-KS
gnaeLVb5iiv_qY3Ctq2XKdIRcFRQLFziFcP4yZJl-NZMlwzsiiwjakcpYpI5jSYAdU2hpZLHRzceseeZt5YfZOe5Px1kZXro9Nd0L2GPC
-qzOXw_V1saMGFa2ov8qV6Dvk92iv2SDDdGhOdII_JOf8XkK4E3g2z0EEFdWhG9F4Iky4ukNsqBPgE8LRb31s0hg

and can be obtained as described in the Authentication chapter.

A Postman collection with examples can be downloaded here.

S1GRD orthorectified linear gamma0 VV between 0 and 0.5 (png)

curl -X POST \
https://services.sentinel-hub.com/api/v1/process \
-H 'Authorization: Bearer <your access token>' \
-F 'request={
"input": {
"bounds": {
"bbox": [
1360000,5121900,1370000,5131900
],
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857"
}
},
"data": [
{
"type": "S1GRD",
"dataFilter": {
"timeRange": {
"from": "2019-02-02T00:00:00Z",
"to": "2019-04-02T23:59:59Z"
}
},
"processing": {
"orthorectify": "true"
}
}
]
},
"output": {
"width": 512,
"height": 512,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/png"
}
}
]
}
}' \
-F 'evalscript=//VERSION=3
function setup() {
return {
input: ["VV"],
output: { id:"default", bands: 1}
}
}
function evaluatePixel(samples) {
return [2 * samples.VV]
}'

S1GRD orthorectified linear gamma0 VV, ascending orbit direction, GeoTIFF in EPSG:32648 (UTM zone 48N)

curl -X POST \
https://services.sentinel-hub.com/api/v1/process \
-H 'Accept: image/tiff' \
-H 'Authorization: Bearer <your access token>' \
-F 'request={
"input": {
"bounds": {
"bbox": [
699800, 1190220, 709800, 1200220
],
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/32648"
}
},
"data": [
{
"type": "S1GRD",
"dataFilter": {
"timeRange": {
"from": "2017-11-15T00:00:00Z",
"to": "2017-11-15T23:00:00Z"
},
"acquisitionMode": "IW",
"polarization": "DV",
"orbitDirection ": "ASCENDING"
},
"processing": {
"backCoeff": "GAMMA0_ELLIPSOID",
"orthorectify": "true"
}
}
]
},
"output": {
"width": 1000,
"height": 1000,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/tiff"
}
}
]
}
}' \
-F 'evalscript=//VERSION=3
function setup() {
return {
input: ["VV"],
output: { id:"default", bands: 1,sampleType: SampleType.FLOAT32}
}
}
function evaluatePixel(samples) {
return [samples.VV]
}'

S1GRD orthorectified decibel gamma0 VH between -20 dB and 0 dB (png)

curl -X POST \
https://services.sentinel-hub.com/api/v1/process \
-H 'Authorization: Bearer <your access token>' \
-F 'request={
"input": {
"bounds": {
"bbox": [
1360000,5121900,1370000,5131900
],
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857"
}
},
"data": [
{
"type": "S1GRD",
"dataFilter": {
"timeRange": {
"from": "2019-02-02T00:00:00Z",
"to": "2019-04-02T23:59:59Z"
}
},
"processing": {
"orthorectify": "true"
}
}
]
},
"output": {
"width": 512,
"height": 512,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/png"
}
}
]
}
}' \
-F 'evalscript=//VERSION=3
function setup() {
return {
input: ["VH"],
output: { id:"default", bands: 1}
}
}
function evaluatePixel(samples) {
return [toDb(samples.VH)]
}
// visualizes decibels from -20 to 0
function toDb(linear) {
// the following commented out lines are simplified below
// var log = 10 * Math.log(linear) / Math.LN10
// var val = Math.max(0, (log + 20) / 20)
return Math.max(0, Math.log(linear) * 0.21714724095 + 1)
}'

S1GRD orthorectified decibel gamma0 RGB composite of VV, VH, VV/VH/10 between -20 dB and 0 dB (png)

curl -X POST \
https://services.sentinel-hub.com/api/v1/process \
-H 'Authorization: Bearer <your access token>' \
-F 'request={
"input": {
"bounds": {
"bbox": [
1360000,5121900,1370000,5131900
],
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857"
}
},
"data": [
{
"type": "S1GRD",
"dataFilter": {
"timeRange": {
"from": "2019-02-02T00:00:00Z",
"to": "2019-04-02T23:59:59Z"
}
},
"processing": {
"orthorectify": "true"
}
}
]
},
"output": {
"width": 512,
"height": 512,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/png"
}
}
]
}
}' \
-F 'evalscript=//VERSION=3
function setup() {
return {
input: ["VV", "VH"],
output: { id:"default", bands: 3}
}
}
function evaluatePixel(samples) {
var vvdB = toDb(samples.VV)
var vhdB = toDb(samples.VH)
return [vvdB, vhdB, vvdB / vhdB / 10]
}
// displays VV in decibels from -20 to 0
function toDb(linear) {
// the following commented out lines are simplified below
// var log = 10 * Math.log(linear) / Math.LN10
// var val = Math.max(0, (log + 20) / 20)
return Math.max(0, Math.log(linear) * 0.21714724095 + 1)
}'

S1GRD non-orthorectified linear sigma0 VH between 0 and 0.5 (png)

curl -X POST \
https://services.sentinel-hub.com/api/v1/process \
-H 'Authorization: Bearer <your access token>' \
-F 'request={
"input": {
"bounds": {
"bbox": [
1360000,5121900,1370000,5131900
],
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857"
}
},
"data": [
{
"type": "S1GRD",
"dataFilter": {
"timeRange": {
"from": "2019-02-02T00:00:00Z",
"to": "2019-04-02T23:59:59Z"
}
},
"processing": {
"orthorectify": "false",
"backCoeff": "SIGMA0_ELLIPSOID"
}
}
]
},
"output": {
"width": 512,
"height": 512,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/png"
}
}
]
}
}' \
-F 'evalscript=//VERSION=3
function setup() {
return {
input: ["VH"],
output: { id:"default", bands: 1}
}
}
function evaluatePixel(samples) {
return [2 * samples.VH]
}'

S1GRD orthorectified gamma0 two month temporal averaged decibel VV between -20 dB and 0 dB (png)

curl -X POST \
https://services.sentinel-hub.com/api/v1/process \
-H 'Authorization: Bearer <your access token>' \
-F 'request={
"input": {
"bounds": {
"bbox": [
1360000,5121900,1370000,5131900
],
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857"
}
},
"data": [
{
"type": "S1GRD",
"dataFilter": {
"timeRange": {
"from": "2019-02-01T00:00:00Z",
"to": "2019-04-02T23:59:59Z"
},
"orbitDirection": "ASCENDING"
},
"processing": {
"orthorectify": "true"
}
}
]
},
"output": {
"width": 512,
"height": 512,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/png"
}
}
]
}
}' \
-F 'evalscript=//VERSION=3
function setup() {
return {
input: ["VV", "dataMask"],
output: { id:"default", bands: 1},
mosaicking: Mosaicking.ORBIT
}
}
function evaluatePixel(samples) {
return [calculateAverage(samples)]
}
function calculateAverage(samples) {
var sum = 0;
var nValid = 0;
for (let i = 0; i < samples.length; i++) {
var sample = samples[i];
if (sample.dataMask != 0) {
nValid++;
sum += toDb(sample.VV);
}
}
return sum / nValid;
}
// visualizes decibels from -20 to 0
function toDb(linear) {
// the following commented out lines are simplified below
// var log = 10 * Math.log(linear) / Math.LN10
// var val = Math.max(0, (log + 20) / 20)
return Math.max(0, Math.log(linear) * 0.21714724095 + 1)
}'