png_import: imports png file an maks to the specific horizont position

Description Usage Arguments Examples

View source: R/png_import.R

Description

sourse sollte noch angepasst werden, evt dropbox oder db

Usage

1
png_import(file_path, horizont, smoothness = 2, raster2polygon = T)

Arguments

file_path

a numeric value between 1 and 6 calling the stored L-system

horizont

A layer with the skeleton content as polygon (bei fehlen gibt es noch einen

smoothness

passed to the smoothr function

raster2polygon

an integer if the raster geometry shoud be transform to an vector polygon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(dplyr) 
library(ggplot2)
sf_example <- soilprofile2::soil_example_sf
photo_Ah_path <- system.file("extdata", "photo_example.png", package = "soilprofile2")
photo_Ah <- png_import(photo_Ah_path, sf_example[1,], raster2polygon = FALSE)


sf_example %>%
  ggplot() +
  geom_sf(fill = sf_example$rgb_col) +
  ggspatial::layer_spatial(photo_Ah)
soil_theme()

nardusstricta/soilprofile2 documentation built on May 23, 2019, 6:04 p.m.