
Extract site metadata from a field-sheet image
Source:R/vlm-extract.R
extract_site_from_fieldsheet.RdSends a photographed / scanned field sheet to a multimodal VLM and
merges the extracted site-level metadata (lat, lon, elevation,
parent material, land use, etc.) into pedon$site. Existing
fields are preserved unless overwrite = TRUE; only NULL
fields are filled.
Usage
extract_site_from_fieldsheet(
pedon,
image_path,
provider,
max_retries = 3L,
overwrite = FALSE,
prompt_name = "extract_site_metadata",
schema_name = "site"
)Arguments
- pedon
A
PedonRecord.- image_path
Path to the field-sheet image.
- provider
A chat provider from
vlm_provider(or aMockVLMProviderfor testing).- max_retries
Integer; how many times to re-prompt on validation failure. Default 3.
- overwrite
If
TRUE, lower-authority values are allowed to clobber higher-authority ones. DefaultFALSE.- prompt_name
Override the default prompt template (
"extract_horizons").- schema_name
Override the default schema (
"horizon").