make_layer: Make a layer

View source: R/make_layer.R

make_layerR Documentation

Make a layer

Description

Create a sfc object containing final centers, original centers, centers displacement, original graticule or final graticule.

Usage

make_layer(
  x,
  type = c("final_centers", "original_centers", "centers_translation", "final_graticule",
    "original_graticule")
)

Arguments

x

a cartogramR object

type

a character string giving the type of layer: - "final_centers": if method is dcn, sf::st_centroid is applied on deformed/cartogram region ; if method is gsm or gn (ie flow based), initial "centers" are calculated and the cartogram deformation is applied on these "centers" giving the final_centers. - "original_centers" if method is dcn, sf::st_centroid is applied on original regions); if method is gsm or gn (ie flow based), initial "centers" are calculated using cartogramR center option see cartogramR_options. - "centers_translation" linestring giving the movement of centers due to the deformation used to have the cartogram - "final_graticule" (method gsm or gn) graticule obtained by the cartogram algorithm - "original_graticule" (method gsm or gn) graticule used by the cartogram algorithm

Value

a sfc object


cartogramR documentation built on Sept. 11, 2024, 5:48 p.m.