Skip to content

Commit c24a519

Browse files
authored
Merge pull request sentinel-hub#82 from sentinel-hub/feature/ndmi
Adding SAR for deforestation
2 parents 1762242 + 70ac7aa commit c24a519

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ You are invited to publish your own scripts - see [howto](#howto).
1818
## <a name="sentinel-1"></a>Sentinel-1
1919
The Sentinel-1 imagery is provided by two polar-orbiting satellites, operating day and night performing C-band synthetic aperture radar imaging, enabling them to acquire imagery regardless of the weather. Main applications are for monitoring sea ice, oil spills, marine winds, waves & currents, land-use change, land deformation among others, and to respond to emergencies such as floods and earthquakes. The identical satellites orbit Earth 180° apart and at an altitude of almost 700 km, offering a global revisit time of 6-12 days depending on the area (check observation scenario). Sentinel-1’s radar can operate in four modes. The spatial resolution depends on the mode: approx. 5 m x 20 m for IW mode and approx. 20 m x 40 m for EW mode. See [Copernicus services](http://www.esa.int/Our_Activities/Observing_the_Earth/Copernicus/Sentinel-1/) for more details.
2020

21+
#### Land use/cover classification algorithms
22+
- [SAR for deforestation](sentinel-1/sar_for_deforestation)
23+
2124
#### Disaster management and prevention algorithms
2225
- [Seldom and regular water surface detection](sentinel-1/seldom_and_regular_water_surface_detection)
2326
- [Forest Hurricane](sentinel-1/forest_hurricane)
Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
## SAR for deforestation detection
22

3-
**SAR for deforestation detection** is a script for the **Sentinel-hub EO-Browser** (https://apps.sentinel-hub.com/eo-browser) that uses the VV and VH bands of the Sentinel 1 and transforms the cartesian space of VV and VH to polar coordinates computing the length and angle of the resulting vector and also the area of the square defined by VV and VH. Then it uses the lenght of the vector as a classifier to discriminate between water, forest and soil.
3+
<a href="#" id='togglescript'>Show</a> script or [download](script.js){:target="_blank"} it.
4+
<div id='script_view' style="display:none">
5+
{% highlight javascript %}
6+
{% include_relative script.js %}
7+
{% endhighlight %}
8+
</div>
49

5-
The script paints in black the water and bare soil areas, and uses both the length and the angle to draw a scale for the forest (green) and soil (red), drawing a stronger green where more forest has been classified and a stronger red or black where more soil has been found.
6-
7-
The script only uses the VV and VH bands of the Sentinel 1, so it will identify bare soil as water (black) and is intended to be used in forest area, returning strange results when used in populated areas.
10+
## Evaluate and visualize
811

9-
#### Examples
12+
- [EO Browser](https://apps.sentinel-hub.com/eo-browser/?lat=-3.1254&lng=113.6286&zoom=10&time=2019-11-08&preset=CUSTOM&datasource=Sentinel-1%20AWS%20(S1-AWS-IW-VVVH)&layers=VV,VH,HH&evalscript=Ly8KLy8gU0FSIGZvciBkZWZvcmVzdGF0aW9uIGRldGVjdGlvbgovLyAtLS0tLS0tLS0tLS0KLy8gMjAxOSAtIEFudG9uaW8gQ2FybG9uIFBhcmVkZXMKLy8gTGljZW5zZTogQ0MgQlkgNC4wCi8vIGh0dHBzOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9ieS80LjAvCi8vCmZ1bmN0aW9uIHNldHVwKGRzKSB7CiAgc2V0SW5wdXRDb21wb25lbnRzKFtkcy5WViwgZHMuVkhdKTsKICBzZXRPdXRwdXRDb21wb25lbnRDb3VudCgzKTsKfQoKY29uc3QgR0FJTiA9IDIuNTsKY29uc3QgV0FURVJfTElNSVQgPSAwLjE7CmNvbnN0IEZPUkVTVF9MSU1JVCA9IDAuMjsKY29uc3QgSU5WRVJTRV9GQUNUT1IgPSAyNTsKCmNvbnN0IEdSRUVOX0dSQURJRU5UID0gWwogICAgWzEuMDAwLCAweDgwRjMwMF0sCiAgICBbMC41MDAsIDB4NDA2NjAwXSwKICAgIFswLjAwMCwgMHgwMDMzMDBdCl0KCmNvbnN0IFJFRF9HUkFESUVOVCA9IFsKICAgIFsxLjAwMCwgMHhGRkZGRkZdLAogICAgWzAuNTI1LCAweEZGODYwMF0sCiAgICBbMC4zMDAsIDB4RkY2RTAwXSwKICAgIFswLjI1MCwgMHhBR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m9jZXNzKGluZGV4KTsKICAgIH0KfTs%3D){:target="_blank"}
1013

11-
The images show several zones of Borneo, in areas affected by palm oil deforestation
14+
## General description of the script
1215

13-
![Image 1](https://github.com/antoniocarlon/SAR4Deforestation/raw/master/images/image1.png)
14-
![Image 2](https://github.com/antoniocarlon/SAR4Deforestation/raw/master/images/image2.png)
15-
![Image 3](https://github.com/antoniocarlon/SAR4Deforestation/raw/master/images/image3.png)
16+
**SAR for deforestation detection** is a script for the [Sentinel-hub EO-Browser](https://apps.sentinel-hub.com/eo-browser){:target="_blank"}, that uses the VV and VH bands of the Sentinel-1 and transforms the cartesian space of VV and VH to polar coordinates computing the length and angle of the resulting vector and also the area of the square defined by VV and VH. Then it uses the lenght of the vector as a classifier to discriminate between water, forest and soil.
1617

17-
A link to explore the results in the **Sentinel-hub EO-Browser**:
18+
The script paints in black the water and bare soil areas, and uses both the length and the angle to draw a scale for the forest (green) and soil (red), drawing a stronger green where more forest has been classified and a stronger red or black where more soil has been found.
1819

19-
https://apps.sentinel-hub.com/eo-browser/?lat=-3.1254&lng=113.6286&zoom=10&time=2019-11-08&preset=CUSTOM&datasource=Sentinel-1%20AWS%20(S1-AWS-IW-VVVH)&layers=VV,VH,HH&evalscript=Ly8KLy8gU0FSIGZvciBkZWZvcmVzdGF0aW9uIGRldGVjdGlvbgovLyAtLS0tLS0tLS0tLS0KLy8gMjAxOSAtIEFudG9uaW8gQ2FybG9uIFBhcmVkZXMKLy8gTGljZW5zZTogQ0MgQlkgNC4wCi8vIGh0dHBzOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9ieS80LjAvCi8vCmZ1bmN0aW9uIHNldHVwKGRzKSB7CiAgc2V0SW5wdXRDb21wb25lbnRzKFtkcy5WViwgZHMuVkhdKTsKICBzZXRPdXRwdXRDb21wb25lbnRDb3VudCgzKTsKfQoKY29uc3QgR0FJTiA9IDIuNTsKY29uc3QgV0FURVJfTElNSVQgPSAwLjE7CmNvbnN0IEZPUkVTV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1JVCkgewogICAgCXJldHVybiBbMF07CiAgICB9IGVsc2UgaWYgKHZfbGVuID4gRk9SRVNUX0xJTUlUKSB7CiAgICAgIAlsZXQgaW5kZXggPSBHQUlOICogdl9sZW4gLSB2X2FuZ2xlX3dlaWdodGVkOwogICAgICAgIHJldHVybiBHUkVFTl9WSVoucHJvY2VzcyhpbmRleCk7CiAgICB9IGVsc2UgewogICAgICAgIGxldCBpbmRleCA9IEdBSU4gKiB2X2xlbl9pbnZlcnNlICsgdl9hbmdsZV93ZWlnaHRlZDsKICAgICAgICByZXR1cm4gUkVEX1ZJWi5wcm9jZXNzKGluZGV4KTsKICAgIH0KfTs%3D
20+
The script only uses the VV and VH bands of the Sentinel-1, so it will identify bare soil as water (black) and is intended to be used in forested areas, returning strange results when used in populated areas.
2021

2122
#### Author
2223

2324
Antonio Carlón Paredes
25+
26+
## Description of representative images
27+
28+
The images show several zones of Borneo, in areas affected by palm oil deforestation.
29+
30+
![Example 1](fig/fig1.png)
31+
![Example 2](fig/fig2.png)
32+
![Example 3](fig/fig3.png)

0 commit comments

Comments
 (0)