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 |
DEM input file status check
dem_check(file, .verbose = TRUE, ...)
dem_check(file, .verbose = TRUE, ...)
file |
XML file download from fgd |
.verbose |
|
... |
Additional arguments passed on to other functions. |
Line element parsed
fgd_line_parse(file)
fgd_line_parse(file)
file |
XML file download from fgd |
type AdmArea, BldA, WA
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).
read_fgd(file)
read_fgd(file)
file |
Path to XML file |
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').
A sf
https://fgd.gsi.go.jp/download/ref_kihon.html
# Administrative Area read_fgd(system.file("extdata/FG-GML-000000-AdmPt-dummy.xml", package = "fgdr"))
# Administrative Area read_fgd(system.file("extdata/FG-GML-000000-AdmPt-dummy.xml", package = "fgdr"))
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)
read_fgd_dem(file, resolution = c(5, 10), return_class)
read_fgd_dem(file, resolution = c(5, 10), return_class)
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' |
A tibble (data.frame), raster, stars or terra
https://fgd.gsi.go.jp/download/ref_dem.html
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")
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")