conv_wkt_to_jpg: Convert WKT to JPG

View source: R/conv_wkt_to_jpg.R

conv_wkt_to_jpgR Documentation

Convert WKT to JPG

Description

Convert the graphical units (GUs) geometries stored as Well-Known Text geometries (WKT) into JPG files in order to perform contour analysis with the Momocs package

Usage

conv_wkt_to_jpg(
  nodes,
  ids = c("site", "decor", "id"),
  dataDir = system.file("extdata", package = "iconr"),
  out.dir = "_out",
  verbose = TRUE
)

Arguments

nodes

nodes dataframe coming from the 'conv_shp_to_wkt.R' function

ids

the field names that constitute the unique key of the GU. By default: c("site", "decor", "id").

dataDir

path to the folder.

out.dir

path of the output folder. By default "_out/" in the "dataDir" folder

verbose

if TRUE (by default), will print messages

Value

JPGs files exported into as many folders as different GUs' types (eg., 'bouche', oeil', 'visage', etc.) The names of the JPGs is the concatenate of their site name, dot, decoration name, dot, GU identifier (eg, "Ain Ghazal.stat_2.1.jpg")

Examples


dataDir <- system.file("extdata", package = "iconr")
nd.df.path <- conv_shp_to_wkt(dataDir = dataDir)
nodes <- read.csv(nd.df.path, sep = ";")
conv_wkt_to_jpg(nodes = nodes)

## Saving 4.33 x 3.94 in image
## Saving 4.33 x 3.94 in image
## ...


zoometh/iconr documentation built on Nov. 9, 2023, 10:01 a.m.