Skip to content

PrabhakarMNaik/WaterSense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Studying Water Bodies using Remote Sensing

Introduction

This project aims at using the opensource tools for studying the changes in surface water bodies that have occured with time due to nature and human intervention. The images acquired from the LandSat 8 satellite are used for the historical information about the water bodies. The tools we are primarily using are Google Earth Engine and Python's image processing library openCV. LandSat-8 carries an Operational Land Imager and a Thermal infrared Sensor that gives us images in 9 spectral bands and 2 infrared bands respectively. A subset of these bands along with some of their combinations, popularly known as Normalized differences will be used for our computations.

The LandSat-8 images are in GeoTiff format and usually identified with a Row and Path number as well as date on which they were acquired. The Row and Path number for a particular location can be found out in many ways, one particular being the official USGS (United States Geological Survey) website. The procedure is explained in this document item 3. Each Row and Path specifies a square shape region of about 185 km x 180 km and around 8000 x 8000 pixels (which varies from scene to scene) size with the resoulution ranging from 30m to about 100m from band to band. The GeoTiff image is an array of pixel intesities, tagged along with geospacial data as well as some metadata pertaining to Loactions, transformations and time stamps. Which is completely reasonable as the Scene cannot treated as a planar surface at these scales. This makes the problem trickier than any other traditional image processing problems.

Methodology

Our algorithm on a higher level finds the water body in the pixel space and gets a bounding region around it. Then this bounding region is projected back in the geodesic coordinates to clip the GeoTiff file in our Region of interest. Then an unsupervised classification algorithm clusters the pixels in the Region of Interest. The algorithm then identify the cluster that represents the water body and report the its area. The detailed algorithm is as below:

Inputs: Path, Row, timeFrame, cloud cover, ReqX, ReqY Hyperparameters: offset, numClusters, numPixels, varBound

  • Set: imageCollection \leftarrow as a set of Scenes for the given (Path, Row, timeFrame, cloud cover).
  • Set: minCC := Index of Scene with minimum cloud cover \in imageCollection
  • Set: image_{minCC} \leftarrow ImageCollection[minCC] as numpy.ndarray
  • Identify: cnt \leftarrow as a set of contours in image_{minCC}
  • Set: contour_{required}:= argmin_{i} Distance((reqX, reqY), centre_{contour_i}) for contour_i \in cnt
  • identify: rect_{required}:=[x, y, width, height] for the bounding rectangle of $contour_{required}$ with offset
  • Project: roi := rect_{required} as an earth engine object.
  • Sample: sampleTraining := points \in image_{minCC} as set. \|sampleTraining\| = numPixels
  • Train: classifier on the for numClusters over sampleTraining
  • For each image \in imageCollection :
    • Clip: image to Roi
    • Classify: points \in image into numClusters
    • Set: kNDWI := \{ Ndwi_i\}_{i = 0}^{numClusters}
    • waterCluster := max_{i}(kNDWI)
    • Compute: area_{image} := PixelArea(waterCluster).
    • if (area_{image} - area_{image_{minCC}}) \leq varBound:
      • areaHistory \leftarrow area_{image}
    • End of if
  • End of For
  • Plot: AreaHistory

Conventions

The local variables identifiers are in camel case with lowercase initials trainingSample. Functions are in camel case with uppercase initials $ProjectRect$. Global variables are in All capitals. The program is will work in python3.x and will use following packages: numpy, ee, IPython.display, matplotlib, geemap, cv2, math, urllib

For using any method in Earth engine library, an Earth Engine account is needed.

Conclusion

This script will help you bound a region around the water body of users' interest and analyse the Surface Area occupied by that body for any duration user specifies while creating the image collection. Furthermore, the not only water bodies, the above algorithm can also be scaled to study other geographic features like, Vegetation cover using NDVI (Normalized Difference Vegetation Index); Snow cover using NDSI (Normalized Difference Snow Index), etc.

Such type of analyses make sense in academic and agricultural settings but also create an awareness about how the combined actions of Humans and Nature are affecting our resources.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published