read_fude: Read Fude Polygon data from a ZIP file

View source: R/read_fude.R

read_fudeR Documentation

Read Fude Polygon data from a ZIP file

Description

read_fude() reads MAFF Fude Polygon data from a ZIP file and returns the layers as a named list of sf::sf() objects. If path is not supplied, the function downloads the ZIP file for the specified prefecture and year using pref, year, and rcom_year.

The ZIP archive may contain one or more supported spatial files in GeoJSON (.json or .geojson) or FlatGeobuf (.fgb) format. The function also works with ZIP files created manually, provided that the original file names are preserved.

Usage

read_fude(
  path = NULL,
  pref = NULL,
  year = 2025,
  rcom_year = 2020,
  crs = NULL,
  supplementary = FALSE,
  quiet = FALSE
)

Arguments

path

Path to a ZIP file containing one or more supported spatial files. If NULL, the file is downloaded automatically from the MAFF website using pref, year, and rcom_year.

pref

Prefecture name or prefecture code used when downloading data. Ignored if path is supplied.

year

The Fude Polygon data year used in the download file name.

rcom_year

The agricultural community boundary year used in the download file name.

crs

Coordinate reference system to transform the output layers to. If NULL, the original CRS is kept.

supplementary

Logical. If TRUE, add supplementary columns such as land-use labels and polygon area.

quiet

Logical. If TRUE, suppress messages during download and reading.

Value

A named list of sf::sf() objects.

Examples

path <- system.file("extdata", "castle.zip", package = "fude")
d <- read_fude(path)


fude documentation built on April 5, 2026, 9:06 a.m.