
Validate well-known binary and well-known text
wkb_problems(wkb)wkt_problems(wkt)
wksxp_problems(wksxp)
A list()
of raw()
vectors, such as that
returned by sf::st_as_binary()
.
A character vector containing well-known text.
A list()
of classed objects
A character vector of parsing errors. NA
signifies
that there was no parsing error.
# NOT RUN {
# well-known text
wkt_problems(c("POINT EMTPY", "POINT (20 30)"))
# well-known binary
wkb <- wkt_translate_wkb("POINT (30 10)", endian = 1)[[1]]
wkb_bad <- wkb
wkb_bad[2] <- as.raw(255)
wkb_problems(list(wkb, wkb_bad))
# }
Run the code above in your browser using DataLab