Skip to content

Land Use and Land Cover Classification

Using multiple sensors with varying resolution sizes to classify the same area often yield difference in the performance of not just the algorithm but also the final result and the overall omission or comission errors that might be present in the imagery. This is further controlled by the behavior of algorithms at scale and the amount of data available for training over a period of time. Though there are existing algorithms for supervised and unsupervise classification in GEE results have shown improvement in classification techniques using machine learning and computer visions. A comparison between the performance of multiple classification algorithms points towards the effcts of coarse and fine grid resolution techniques and how we can improve on existing methods.

Data Source

Open California data can be used for this and has been provided in both GEE and can be downloaded using your newly registered Planet account. Remember that a lot of these training sets are specific for image based on coverage and as a result may not work if applying over extra large collections unless a consistent area is used. You can bring your own classification dataset, by using a GPS to locate specific land cover types that you maybe interested in classifying. We are sharing imagery over the Folsom Lake area along with the dam so you can look at multiple class configuration and classification strategies.

//Date Range 2017-01-01 to 2017-12-31
var folsom_aoi=ee.FeatureCollection('ft:1cjxdATGy3NTuR2st8zIJfJFhP8N33ef5j8J6R1qS') //AOI boundary for Folsom Lake
var folsom_img=ee.ImageCollection('projects/sat-io/Planet/folsom_ps') //Image Collection for Folsom Lake with PlanetScope 4Band analytic imagery

Suggested Methods

You can find a lot of literature and methods on optimal ways of classifying an image and each have their own strengths and weaknesses. Look for a couple of things including percentage accuracy if you have ground validation data to verify, time taken to run the algorithm over your imagery, sensor methods and tools you could come up with including applications of an image collection in machine learning algorithms to see any improvements, deep time stacks are useful for training and pre processing. One of the most intersting challenges is often simply cloud and cloud shadow classification, find out ways you maybe able to extract those as classes or masks.

Here is a simple Classification and Regression Tree(CART Classification) function to be applied to an image the classes for training for which are selected directly from the image

// Merge geometry for feature collections together.
var newfc = geometry.merge(geometry2).merge(geometry3)
  // Make the landcover codes be integers starting from 0
  .remap([1, 2,3], [0, 1,2], 'landcover');
print(newfc)
// Load Landsat 8 TOA images, get the least cloudy 2015 image.
var image = ee.Image('projects/mdh/Planet/OpenCA/PSScene4Band/20171205_214338_0f06')
Map.centerObject(image)
Map.addLayer(image)

// Use these bands in the prediction.
var bands = ['B', 'G', 'R', 'N'];

// Make training data by 'overlaying' the points on the image.
var training = image.select(bands).sampleRegions({
  collection: newfc,
  properties: ['landcover'],
  scale: 3
});

// Get a CART classifier and train it.
var classifier = ee.Classifier.cart().train({
  features: training,
  classProperty: 'landcover',
  inputProperties: bands
});

// Classify the image.
var classified = image.select(bands).classify(classifier);

// Display the results.
Map.centerObject(newfc, 14);
Map.addLayer(image, {bands: ['N', 'R', 'B'], max: 2800}, 'PlanetScope image');
Map.addLayer(classified, {min: 0, max: 2, palette: ['0000FF', '00FF00', 'FF0000']}, 'classification');

};

classification

Resultant image generates a three class classification which can then be checked for accuracy and performance of algorithm given the training data.