Overview
OpenLand accepts land use and cover (LUC) raster data in multiple formats. Proper data preparation is essential for successful intensity analysis and visualization.Supported Input Formats
OpenLand can load raster data from:- RasterStack: Multi-layer raster stack object
- RasterBrick: Multi-layer raster brick object
- RasterLayer: Single raster layer (will be converted to stack)
- Directory path: Path to folder containing
.tiffiles - List: Named list of RasterLayer objects
Naming Conventions
The year component is extracted from the layer name and used to:- Order time series chronologically
- Calculate time intervals between observations
- Label plots and analysis outputs
Loading Raster Data
OpenLand includes a sample dataset
SaoLourencoBasin - a 5-layer RasterStack covering 2002, 2008, 2010, 2012, and 2014.# View the RasterStack structure
SaoLourencoBasin
# Output:
# class : RasterStack
# dimensions : rows, cols, cells, nlayers
# resolution : 30, 30 (x, y)
# extent : xmin, xmax, ymin, ymax
# crs : +proj=utm +zone=21 +south +datum=WGS84
# names : landscape_2002, landscape_2008, landscape_2010, landscape_2012, landscape_2014
# Already in memory - use directly
data_table <- contingencyTable(input_raster = SaoLourencoBasin,
pixelresolution = 30)
# Path to folder containing .tif files
raster_path <- "/path/to/raster/directory"
data_table <- contingencyTable(input_raster = raster_path,
pixelresolution = 30)
Raster Requirements
Spatial Consistency
All rasters in the time series must have: ✓ Same extent: Identical geographic boundaries✓ Same resolution: Identical pixel size
✓ Same projection: Identical coordinate reference system
✓ Same dimensions: Same number of rows and columns
Checking Raster Consistency
Usesummary_dir() to verify raster parameters:
file_name: Layer namexmin,xmax,ymin,ymax: Extent boundariesres_x,res_y: Pixel resolutionnrow,ncol: Grid dimensionsmin_val,max_val: Category value rangescrs: Coordinate reference system
Checking a Single Raster
Usesummary_map() to examine pixel counts by category:
Pixel Resolution
Thepixelresolution parameter specifies the pixel size in meters. This is used to convert pixel counts to area in km².
- 1 pixel = 30 × 30 = 900 m² = 0.0009 km²
- 1000 pixels = 0.9 km²
Categorical Raster Values
Raster pixels must contain integer category codes, not continuous values.For example:
- ✓
2= Pasture - ✓
3= Forest - ✓
4= Savannah - ✗
1.5,2.73= Invalid (continuous values)
Minimum Requirements
Example: Complete Data Loading Workflow
Next Steps
After loading your raster data:- Edit the legend table with meaningful category names and colors
- Run intensity analysis to quantify land use changes
- Create visualizations to explore transitions
- Perform spatial analysis to map change patterns