Either "vector", "raster" or "network" depending on the file extension.

layer_type(x)

Arguments

x

string. A file name.

Value

character. Either "vector", "raster" or "network". NA for unknown formats.

Examples

  layer_type("myfile.tif")
#> [1] "raster"
  layer_type("myfile.gpkg")
#> [1] "vector"