The geobuf format is an optimized binary format for storing geojson data with protocol buffers. These functions are compatible with the geobuf2json and json2geobuf utilities from the geobuf npm package.

read_geobuf(x, as_data_frame = TRUE)

geobuf2json(x, pretty = FALSE)

json2geobuf(json, decimals = 6)

Arguments

x

file path or raw vector with the serialized geobuf.proto message

as_data_frame

simplify geojson data into data frames

pretty

indent json, see jsonlite::toJSON

json

a text string with geojson data

decimals

how many decimals (digits behind the dot) to store for numbers