Title: | Utilities for Fundamental Geo-Spatial Data |
Version: | 1.1.1 |
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. |
License: | MIT + file LICENSE |
Imports: | data.table (≥ 1.12.8), jpmesh (≥ 1.1.1), magrittr (≥ 1.5), purrr (≥ 0.2.5), raster (≥ 2.6.7), readr (≥ 1.3.1), rlang (≥ 0.2.2), sf (≥ 0.6.3), stars (≥ 0.3-1), stringr (≥ 1.3.1), terra (≥ 0.8-2), tibble (≥ 3.0.0), units (≥ 0.6.6), xml2 (≥ 1.2.0) |
Encoding: | UTF-8 |
URL: | https://github.com/uribo/fgdr |
BugReports: | https://github.com/uribo/fgdr/issues |
RoxygenNote: | 7.1.2 |
Suggests: | covr (≥ 3.4.0), roxygen2 (≥ 6.1.1), testthat (≥ 2.3.1) |
Depends: | R (≥ 3.3.0) |
NeedsCompilation: | no |
Packaged: | 2022-02-22 04:41:23 UTC; suryu |
Author: | Shinya Uryu |
Maintainer: | Shinya Uryu <suika1127@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2022-02-22 05:00:02 UTC |
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
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 |
|
... |
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")