Skip to contents

Read layers from a Felt map with read_felt_layers(), delete a single layer with delete_felt_layer(), update a layer with update_felt_layer(), or create a new layer from a URL, file, or sf or sfc object with create_felt_layer(). Note that reading layers does not return layer data—only a list of layers.

Usage

create_felt_layer(
  map_id,
  layer,
  name = NULL,
  fileext = "gpkg",
  ...,
  fill_color = NULL,
  stroke_color = NULL,
  webhook_url = NULL,
  token = NULL
)

delete_felt_layer(map_id, layer_id = NULL, safely = TRUE, token = NULL)

read_felt_layers(
  map_id,
  simplifyVector = TRUE,
  token = NULL,
  call = caller_env()
)

update_felt_layer(
  map_id,
  layer_id,
  name = NULL,
  description = NULL,
  simplifyVector = TRUE,
  token = NULL,
  call = caller_env()
)

Arguments

map_id

A Felt map URL, map ID string, or a named list with a id and type element. If map_id is a list, it must be equivalent to the output from get_felt_map() where the list includes a "id" string and a "type" string with the value "map".

layer

Required. A object, file path, a layer source URL, or a sf or sfc object. If layer is a file path or a source URL, the file type or URL type must be supported by Felt. See https://feltmaps.notion.site/Upload-Anything-b26d739e80184127872faa923b55d232#3e37f06bc38c4971b435fbff2f4da6cb for details. If layer is a sf or sfc object, the object is saved to a temporary file using the supplied fileext.

name

Name for new map layer.

fileext

File extension to use for temporary file if layer is a sf or sfc object.

...

Additional parameters passed to sf::st_write() if layer is a sf or sfc object.

fill_color, stroke_color

Hex string to use as the layer fill or stroke color. Optional.

webhook_url

When the layer finishes processing, Felt will notify to this URL.

token

Felt personal access token

layer_id

Layer ID. Layer IDs for a map can be listed using read_felt_layers()

safely

If TRUE (default), check for user confirmation before deleting a Felt map. If FALSE, delete map without checking.

simplifyVector

Should JSON arrays containing only primitives (i.e. booleans, numbers, and strings) be caused to atomic vectors?

call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.

description

Map description