plot.lu.ecors: Plot lu.ecors object

View source: R/plot.lu.ecors.R

plot.lu.ecorsR Documentation

Plot lu.ecors object

Description

Plot MapBiomas images processed by get.lu.ecors along with site and sample polygons.

Usage

## S3 method for class 'lu.ecors'
plot(x, comp = NULL, zoom = 12, legend = T)

Arguments

x

lu.ecors object (from get.lu.ecors).

comp

lu.ecors object generated by focal.lu.ecors or convert.lu ecors functions or ecors object (remote sensing) used for comparison (optional).

zoom

initial zoom value.

legend

choose to show the legend or not.

Value

Google Earth Engine containers objects are exported to .GlobalEnv to be used in rgee functions and avoid errors (elapsed time limit):

  • map.samples: sample polygons (evaluation carried out in the surroundings of these polygons),

  • map.site: site polygon (evaluation carried out in the surroundings of this polygon),

  • map.polygons: polygon for land use evaluation (evaluation carried out inside these polygons),

  • map.buffer(i): polygons of buffer areas (if selected in get.lu.ecors);

  • map.lu(i): plot object of a raster image (one object per image),

  • leg.lu: legend.

Examples

# Get a lu.ecors class object
FAL.IBGE.JBB<-sf::st_read(system.file("extdata/FAL.IBGE.JBB.gpkg", package="ecors"))
test.points<-sf::st_read(system.file("extdata/Points_tests.gpkg", package="ecors"))
test.plots<-sf::st_read(system.file("extdata/Plots_tests.gpkg", package="ecors"))

# Get data (projecting to UTM 32S zone to performe buffer operations)
lu2000_2010<-get.lu.ecors(site=FAL.IBGE.JBB, points=test.points, plots=test.plots,
     polygons=NULL, id.column=1, projected=F, custom.crs=32723,
     collection.lu="mapbiomas6", years=c(2000,2010), resolution=30, evaluate="surroundings.site",
     buffer1=5000, buffer2=10000, buffer3=15000, cumulative.surroundings=F)

# Plotting
plot(x=lu2000_2010)

# Focal post-processing and visually checking
f_lu2000_2010<-focal.lu.ecors(x=lu2000_2010,window.radius=80)
plot(x=lu2000_2010, comp=f_lu2000_2010)

# Grouping several native land use classes and visually checking
converted<-convert.lu.ecors(x=lu2000_2010,old.value = c(1,3,4,10,11,12,13),new.value = rep(1,times=7), new.lu.class = rep("Native",times=7))
plot(x=lu2000_2010, comp=converted)

fredtaka/ecors documentation built on Aug. 26, 2022, 6:58 a.m.