Preparing the land cover raster

There is currently no automatic script to generate land cover rasters. This part has to be done manually by the user.

Parcel mode

The land cover information has to be included in the parcel definition shapefile. Each parcel should have a land cover class identification number (integers starting by one). Extraction is then done automatically by the NDVI extraction scripts. This will later be used to build an artificial raster to run the models.

Warning

Development in progress

Pixel mode

For the pixel mode, the user has to find a land cover raster and project it on the same grid as the NDVI and weather datasets. Each class should be represented as an integer (starting at one) and saved as a Geotiff file (for OTB). Once you have a valid raster, you can reproject it and clip it using the OTB Superimpose function. Here is an example of the command you can run to do that:

(modspa_pixel) $ otbcli_Superimpose -inr reference_satellite_image.tif -inm lc_raster_input.tif -out lc_raster_output.tif -interpolator nn

Where:

  • -inr is the reference image on which you want to superimpose your raster (e.g. Sentinel-2 image or extraction of Sentinel-2 image).

  • -inm is the raster you want to superimpose.

  • -out is the name of the output raster that will be created

  • -interpolator is the chosen interpolator (nn stands for nearest neighbor), other interpolators will not work as they will create new float values between the integer values.

  • additional parameters like the data type can be found in the OTB documentation

You will then have a land cover raster on the same grid as the other inputs.