Springe direkt zu Inhalt

Data Preparation

First off, we will need to prepare the data according to our research question.

In this example, the Syrian region of Raqqa is chosen as the research area. Of course, as usual, the research area can be easily adjusted to any other region by choosing a different boundary geometry. To access the geometry of Raqqas boundary, we can simply use the GAUL Level 1 Layers we are already familiar with.

Accessing the AOI geometry

Access the boundary geometry of Raqqa

var extent_aoi = ee.FeatureCollection("FAO/GAUL/2015/level1")
                  .filter(ee.Filter.eq('ADM1_NAME', 'Raqqa')); //filter for entry that equals GAUL Level 1 feature named 'Raqqa'
print(extent_aoi, 'Extent AOI');
Map.addLayer(extent_aoi, {},'Extent AOI');
Map.centerObject(extent_aoi, 8);

Accessing the Sentinel-2 Imagery

Next, we will need to access our reference Imagery. As we want to have a cloudfree Image, we will filter for the least cloudy Image of June 2020.

var s2a = ee.ImageCollection('COPERNICUS/S2_SR')
                  .filterBounds(extent_aoi)
                  .filterDate('2020-06-01', '2020-06-30')
                  .select('B1','B2','B3','B4','B5','B6','B7','B8','B8A','B9','B11','B12')
                  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 10));
print(s2a, 'Image Collection Raqqa June 2020');

//Step 3: Create a single Image by reducing by Median and clip it to the extent of the geometry
var s2a_median = s2a.median()
                    .clip(extent_aoi);

//Print your Image to your console tab to inspect it
print(s2a_median, 'Median reduced Image Raqqa June 2020');

//Add your Image as a map layer
var visParams = {'min': 400,'max': [4000,3000,3000],   'bands':'B8,B3,B2'};
Map.addLayer(s2a_median, visParams, 'S2 Raqqa June 2020 Median');

We have now prepared cloudfree Sentinel-2 Imagery for our research area and are therefore ready to start the classification.

In the next step, we will have a look at how to sample training data needed for the LULC-Classification.