Earth Engine by Example

A common concern when doing land cover classifications is the risk of spatial autocorrelation in sampled data skewing the prediction results or accuracy assessment. One method that can help with this issue is ensuring the training and validation samples are sufficiently spaced using some form of buffering. This example will demonstrate one way to do that.

A brute-force method for generating a random sample with a buffer might be to take a large set of samples and filter those down to a smaller number by discarding close neighbors. However, picking which points to start from can…

Earth Engine by Example

A common problem people struggle to solve with Earth Engine is computing various kinds of runs, especially through time using an Image Collection. Calculating these kinds of values involves looking at a pixel’s temporal neighbors, and Earth Engine collections don’t readily support that. This example will show you how to solve these kinds of problems using Earth Engine Arrays.

Just in case you’ve never seen or used an Earth Engine Array, it’s a numeric type that can hold multiple values, arranged as a multidimensional (rectangular) array. …

Earth Engine by Example

Histogram matching is a quick and easy way to “calibrate” one image to match another. In mathematical terms, it’s the process of transforming one image so that the cumulative distribution function (CDF) of values in each band matches the CDF of bands in another image.

To illustrate what this looks like and how it works, I’m going to histogram-match a high-resolution (0.8m/pixel) SkySat image to the Landsat 8 calibrated surface reflectance images taken around the same time. Below is what it looks like with the SkySat image overlaid on top of the Landsat data, before the matching. …

Noel Gorelick

I’m a software engineer at Google and one of the founders of Google Earth Engine.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store