Package 'fgdr'

Title: Utilities for Fundamental Geo-Spatial Data
Description: Read and Parse for Fundamental Geo-Spatial Data (FGD) which downloads XML file from providing site (<https://fgd.gsi.go.jp/download/menu.php>). The JPGIS format file provided by FGD so that it can be handled as an R spatial object such as 'sf' and 'raster', 'terra' or 'stars'. Supports the FGD version 4.1, and accepts fundamental items and digital elevation models.
Authors: Shinya Uryu [aut, cre]
Maintainer: Shinya Uryu <[email protected]>
License: MIT + file LICENSE
Version: 1.1.1.9000
Built: 2024-11-12 02:55:17 UTC
Source: https://github.com/uribo/fgdr

Help Index


DEM input file status check

Description

DEM input file status check

Usage

dem_check(file, .verbose = TRUE, ...)

Arguments

file

XML file download from fgd

.verbose

logical. suppress info input XML file's about DEM information.

...

Additional arguments passed on to other functions.


Line element parsed

Description

Line element parsed

Usage

fgd_line_parse(file)

Arguments

file

XML file download from fgd

Details

type AdmArea, BldA, WA


Read and Parse Fundamental Geospatial Data (FGD) file

Description

The JPGIS (GML) format file provided by FGD as input, the fundamental items in the file is read as an 'sf' object. Supporting FGD Version 4.1 (2016/10/31).

Usage

read_fgd(file)

Arguments

file

Path to XML file

Details

Support following items: Administrative Area ('AdmArea'), Administrative Boundary ('AdmBdry'), Representative point of Administrative Area ('AdmPt'), Building Area ('BldA'), Building Outline ('BldL'), Contour ('Cntr'), Community Boundary ('CommBdry'), Representative Point of Community Area ('CommPt'), Coastline ('Cstline'), Elevation Point ('ElevPt'), Geodetic Control Point ('GCP'), Railroad Track Centerline ('RailCL'), Road Component ('RdCompt'), Road Edge ('RdEdg'), Water Area ('WA'), Water Line ('WL') and Waterside Structure Line ('WStrL').

Value

A sf

See Also

https://fgd.gsi.go.jp/download/ref_kihon.html

Examples

# Administrative Area
read_fgd(system.file("extdata/FG-GML-000000-AdmPt-dummy.xml", package = "fgdr"))

Read and Parse Fundamental Geospatial Data (FGD) dem file

Description

The JPGIS (GML) format file provided by FGD as input, the digital elevation models in the file are read as a data.frame or spatial object (raster, stars or terra). Supporting FGD Version 4.1 (2016/10/31)

Usage

read_fgd_dem(file, resolution = c(5, 10), return_class)

Arguments

file

Path to XML file

resolution

the number of dem mesh size resolution: 5m or 10m

return_class

one of return object class: 'data.table' for faster than data.frame, 'data.frame', 'raster', 'stars' or 'terra'

Value

A tibble (data.frame), raster, stars or terra

See Also

https://fgd.gsi.go.jp/download/ref_dem.html

Examples

fgd_5dem <- system.file("extdata/FG-GML-0000-00-00-DEM5A-dummy.xml", package = "fgdr")
read_fgd_dem(fgd_5dem,
             resolution = 5,
             return_class = "data.table")
read_fgd_dem(fgd_5dem,
             resolution = 5,
             return_class = "data.frame")
# return as raster
read_fgd_dem(fgd_5dem,
             resolution = 5,
             return_class = "raster")
# return as stars
fgd_10dem <- system.file("extdata/FG-GML-0000-10-dem10b-dummy.xml", package = "fgdr")
read_fgd_dem(fgd_10dem,
             resolution = 10,
             return_class = "stars")