Learn R Programming

geojson (version 0.3.4)

linting_opts: GeoJSON Linting

Description

GeoJSON Linting

Usage

linting_opts(
  lint = FALSE,
  method = "hint",
  error = FALSE,
  suppress_pkgcheck_warnings = FALSE
)

Arguments

lint

(logical) lint geojson or not. Default: FALSE

method

(character) method to use:

  • hint - uses geojsonlint::geojson_hint()

  • lint - uses geojsonlint::geojson_lint()

  • validate - uses geojsonlint::geojson_validate()

error

(logical) Throw an error on parse failure? If TRUE, then function returns TRUE on success, and stop with the error message on error. Default: FALSE

suppress_pkgcheck_warnings

(logical) Suppress warning when geojsonlint is not installed? Default: FALSE

Details

if you have geojsonlint installed, we can lint your GeoJSON inputs for you. If not, we skip that step.

Note that even if you aren't linting your geojson with geojsonlint, we still do some minimal checks.

Examples

Run this code
linting_opts(lint = TRUE)

linting_opts(lint = TRUE, method = "hint")
linting_opts(lint = TRUE, method = "hint", error = TRUE)
linting_opts(lint = TRUE, method = "lint")
linting_opts(lint = TRUE, method = "lint", error = TRUE)
linting_opts(lint = TRUE, method = "validate")
linting_opts(lint = TRUE, method = "validate", error = TRUE)

Run the code above in your browser using DataLab