| ddbs_read_meta | R Documentation |
Retrieves file-level metadata from a spatial vector file (e.g. GeoPackage,
Shapefile, GeoJSON) using DuckDB's ST_Read_Meta() function. Returns
information about the file's driver and its layers as a tibble.
ddbs_read_meta(path, conn = NULL)
path |
character, path to the spatial file to inspect. |
conn |
A |
A tibble with one row per file and the
following columns:
Path to the file.
Short name of the GDAL driver (e.g.
"GPKG").
Full name of the GDAL driver (e.g.
"GeoPackage").
A list-column of data frames, one per file, each
describing the layers contained in the file. Unnest with
unnest to access individual layer attributes
such as name, geometry type, and feature count.
## Not run:
## Read metadata from a GeoPackage
meta <- ddbs_read_meta(
system.file("spatial/rivers.geojson",
package = "duckspatial")
)
## View file-level metadata
meta
## Inspect layer details
tidyr::unnest(meta, layers)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.