View source: R/prepare.vector.data.R
prepare.vector.data | R Documentation |
The function takes shapefile with polygons of different surface classes (habitats, crops, vegetation, etc.), and retrieves ready-for-sampling sf object.
prepare.vector.data(shapefile_name, label_field)
shapefile_name |
shapefile name (should be within working directory, using absolute paths were not tested) |
label_field |
name of the field which contains class labels |
sf object with label (characters) and class (integer) variables, as well as geometry of each polygon, ready to further processing by rgee.
# Load example data
load(system.file("testdata/reflectance_test_data.RData", package = "spectralR"))
# Prepare vector data
sf_df <- prepare.vector.data(
shapefile_name = system.file("extdata/test_shapefile.shp", package = "spectralR"),
label_field = "veget_type")
head(sf_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.