Skip to content

Commit 81bf1a4

Browse files
authored
Merge pull request #107 from developmentseed/sentinel-hub-example
Add sentinel hub example
2 parents fdadbcb + 1e953cf commit 81bf1a4

File tree

5 files changed

+37
-0
lines changed

5 files changed

+37
-0
lines changed

examples/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@
1111

1212
- [Prebuilt ResNet50 Usage](nets/resnet.py)
1313
- [LeNet in MXNet](nets/SageMaker_mx-lenet.ipynb)
14+
15+
## Other Examples
16+
17+
- [Preparing Data with Sentinel Hub](sentinel-hub.md)
128 KB
Loading
110 KB
Loading
108 KB
Loading

examples/sentinel-hub.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Preparing Data with Sentinel Hub
2+
3+
[Sentinel Hub](https://www.sentinel-hub.com/) is an easy way to access Sentinel imagery for use in machine learning applications. As an example, here is a configuration file for creating building segmentation masks in Valencia, Spain from Sentinel-2 imagery:
4+
5+
```json
6+
{
7+
"country": "spain",
8+
"bounding_box": [
9+
-0.745697021484375,
10+
39.28010491220614,
11+
-0.3076171875,
12+
39.625788248139436
13+
],
14+
"zoom": 14,
15+
"classes": [
16+
{ "name": "Building", "filter": ["has", "building"] }
17+
],
18+
"imagery": "https://services.sentinel-hub.com/ogc/wms/[WMS_ID]?service=WMS&request=GetMap&layers=1_TRUE_COLOR&styles=&format=image%2Fpng&transparent=true&version=1.1.1&showlogo=false&name=Sentinel-2%20L1C&width=256&height=256&pane=activeLayer&maxcc=100&time=2018-07-15%2F2018-07-15&srs=EPSG%3A3857&bbox={bbox}",
19+
"background_ratio": 1,
20+
"ml_type": "segmentation"
21+
}
22+
23+
```
24+
25+
We've chosen zoom 14 because it roughly corresponds to the maximum resolution of Sentinel imagery (~9.547m vs 10m). Also make sure to replace `[WMS_ID]` with your Sentinel Hub WMS in the `imagery` link above.
26+
27+
Here are some example labels created from this configuration:
28+
29+
![Labeled imagery in Valencia, Spain](images/valencia-example-1.png)
30+
![Labeled imagery in Valencia, Spain](images/valencia-example-2.png)
31+
![Labeled imagery in Valencia, Spain](images/valencia-example-3.png)
32+
33+
While the resolution might not support accurate single building footprint mapping, it can be used to create a classifier for built-up or urban areas.

0 commit comments

Comments
 (0)