Skip to content

Commit b8486bb

Browse files
committed
README updates
1 parent 8085954 commit b8486bb

File tree

6 files changed

+26
-9
lines changed

6 files changed

+26
-9
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# Querying and Processing Sentinel-2 Satellite Imagery Using SentinelAPI
22
Using the [Copernicus Open Access Hub](https://scihub.copernicus.eu/) with the [Sentinel Python API](https://sentinelsat.readthedocs.io/en/master/api_overview.html) to source and process satellite rasters for zonal statistics.
33

4+
Below is an example of an RGB GeoTIFF layer produced by the program. This layer can be loaded into any GIS applications such as ArcGIS and QGIS.
5+
6+
<div style="text-align: center;">
7+
8+
![](/mkdwn/rgb.png "Satellite Imagery - Greater Seattle")
9+
10+
</div>
11+
12+
413
## Installation and Use
514

6-
Download and unzip the latest release [here](). Unzip into location of your choice.
15+
Download and unzip the latest release [here](https://github.com/hynesconnor/sentinel_processing/releases). Unzip into location of your choice.
716

817
**IMPORTANT**: Specifications on the Python versions used and the packages installed can be found in `requirements.txt`.
918

@@ -32,4 +41,12 @@ Download and unzip the latest release [here](). Unzip into location of your choi
3241
- NDVI .tif file will be output to `../data/processed/ndvi`.
3342
- NDWI .tif file will be output to `../data/processed/ndwi`.
3443

35-
4. The mean vegitation density of the raster is also printed to the console.
44+
4. The mean vegitation and water density of the rasters are also printed to the console.
45+
46+
## In Practice. . .
47+
48+
Below are two examples of NDVI and NDWI layers produced by the image processesing steps. The layers are produced using Sentinel-2 data of the greater Seattle area. These layers can be loaded into GIS applications such as ArcGIS or QGIS.
49+
50+
NDVI | NDWI
51+
- | -
52+
![](/mkdwn/ndvi_color.png) | ![](/mkdwn/ndwi_color2.png)

image_processing.py

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

1212
# parameters to be adjusted
1313
BAND_COUNT = 3 # used to control the number of bands being written. (rgb default = 3)
14-
FOLDER = 'sentinelLV' # satellite folder, change to desired satellite data within the image folder
14+
FOLDER = '' # satellite folder, change to desired satellite data within the image folder
1515

1616
# creates array of band names, returns band names and path to bands
1717
def get_file_names():
@@ -57,7 +57,7 @@ def rgb():
5757
band_names, IMG_DIR = get_file_names()
5858
bands = band_process(band_names, IMG_DIR)
5959
band_write(bands)
60-
print("Completed.")
60+
print("RGB Completed.")
6161

6262
rgb()
6363

@@ -116,14 +116,14 @@ def ndvi():
116116
ndvi = ndvi_calc()
117117
export_normalized_diff(ndvi, 'ndvi/', FOLDER + '_ndvi.tif')
118118
print('Mean vegitation density of raster: ' + np.nanmean(ndvi[0]).astype(str))
119-
print('Completed.')
119+
print('NDVI Completed.')
120120

121121
# reports and writes ndwi statistics
122122
def ndwi():
123123
ndwi = ndwi_calc()
124124
export_normalized_diff(ndwi, 'ndwi/', FOLDER + '_ndwi.tif')
125-
#print('Mean water density of raster: ' + np.nanmean(ndwi[0]).astype(str))
126-
print('Completed.')
125+
print('Mean water density of raster: ' + np.nanmean(ndwi[0]).astype(str))
126+
print('NDWI Completed.')
127127

128128
ndvi()
129129
ndwi()

mkdwn/ndvi_color.png

1.55 MB
Loading

mkdwn/ndwi_color2.png

1.32 MB
Loading

mkdwn/rgb.png

846 KB
Loading

sentinel_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
URL = 'https://developers.google.com/public-data/docs/canonical/countries_csv'
1414
COU_DIR = '/data/country/'
1515
IMG_DIR = '/data/image/'
16-
USER = ''
17-
PASS = ''
16+
USER = '' # enter username
17+
PASS = '' # enter password
1818
DATE_END = date.today()
1919

2020
# adjustable search parameters

0 commit comments

Comments
 (0)