Title: | Assistance on the National Geography of Japan |
---|---|
Description: | Data set on Japan's national geography. Provides tools for efficient processing and visualization of unique coordinate systems. |
Authors: | Shinya Uryu [aut, cre] , Geospatial Information Authority of Japan [cph] (Author of Global Map Japan Data) |
Maintainer: | Shinya Uryu <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.2.9000 |
Built: | 2024-10-31 20:37:13 UTC |
Source: | https://github.com/uribo/kuniezu |
A list of the east, west, south and north ends of Japan's territory (including remote islands). The northernmost position is what the government claims.
extreme_points
extreme_points
A four length list consisting of sfc
https://www.gsi.go.jp/KOKUJYOHO/center.htm
extreme_points extreme_points$east require("purrr") extreme_points %>% reduce(c)
extreme_points extreme_points$east require("purrr") extreme_points %>% reduce(c)
Drawing a segment line segment that shows the boundary
geom_jpsegment(...)
geom_jpsegment(...)
... |
other arguments passed on to geom_segment. |
ggplot object and plot
require("ggplot2") require("sf") move_jpn_rs(jgd2011_bbox) %>% ggplot() + geom_sf() + geom_jpsegment()
require("ggplot2") require("sf") move_jpn_rs(jgd2011_bbox) %>% ggplot() + geom_sf() + geom_jpsegment()
Add a tile layer from Geospatial Information Authority of Japan (GSI).
gsi_tiles
gsi_tiles
A 48 length, leaflet objects.
Stores map tiles that can be used with leaflets.
Please follow the terms and conditions of use for the applicable tile at
https://maps.gsi.go.jp/development/ichiran.html
when using it.
It contains tiles that can be used as base maps for interactive maps based on leaflet.
See example section its use in leaflet. To use a mapview,
a tile name is given to mapview::mapview(map = )
.
names(gsi_tiles) require("leaflet") gsi_tiles[[1]] gsi_tiles[[1]] %>% addCircles( data = sf::st_transform(extreme_points %>% purrr::reduce(c), crs = 4326))
names(gsi_tiles) require("leaflet") gsi_tiles[[1]] gsi_tiles[[1]] %>% addCircles( data = sf::st_transform(extreme_points %>% purrr::reduce(c), crs = 4326))
Japanese Geodetic Datum 2011
jgd2011_bbox
jgd2011_bbox
A sf (CRS EPSG:6668) with 19 rows 3 variables:
system
epsg
geometry
Original polygon data copyright is the Geospatial Information Authority of Japan; compiled for R by Shinya Uryu.
Global Map Japan https://www.gsi.go.jp/kankyochiri/gm_jpn.html. Created by processing Global Map Japan.
require("sf") jgd2011_bbox
require("sf") jgd2011_bbox
Locations of 47 government offices in Japan's prefectures.
jp47prefectural_offices
jp47prefectural_offices
A sf contains 2 column and 47 rows.
The original file was downloaded from https://www.gsi.go.jp/KOKUJYOHO/center.htm, which parses the PDF data and organizes the coordinates of the prefectural hall.
require("sf") jp47prefectural_offices
require("sf") jp47prefectural_offices
Move geometry differently from the real-life arrangement for mapping. When displaying a map showing Japan, the southern islands are sometimes moved. To achieve this, we need to perform false operations on the geometry.
move_jpn_rs(data, clip = TRUE)
move_jpn_rs(data, clip = TRUE)
data |
sf that records the prefecture or municipality of Japan |
clip |
An option to hide isolated island that are separated from other geometry and have a small area. |
sf. Geometry in Tokyo may have rows duplicated in Honshu and islands.
require("sf") move_jpn_rs(jgd2011_bbox)
require("sf") move_jpn_rs(jgd2011_bbox)
Parse longitude and latitude values in DMS
parse_lon_dohunbyo(longitude) parse_lat_dohunbyo(latitude)
parse_lon_dohunbyo(longitude) parse_lat_dohunbyo(latitude)
longitude |
longitude values |
latitude |
latitude values |
numeric vector
x <- "\u6771\u7d4c139\u5ea644\u520628\u79d28869" parse_lon_dohunbyo(x) y <- "\u5317\u7def35\u5ea639\u520629\u79d21572" parse_lat_dohunbyo(y)
x <- "\u6771\u7d4c139\u5ea644\u520628\u79d28869" parse_lon_dohunbyo(x) y <- "\u5317\u7def35\u5ea639\u520629\u79d21572" parse_lat_dohunbyo(y)
Replace Kanji in degrees, minutes, and seconds with symbols
replace_dohunbyo_kanji(x)
replace_dohunbyo_kanji(x)
x |
character |
character vector
x <- "\u6771\u7d4c139\u5ea644\u520628\u79d28869" replace_dohunbyo_kanji(x) y <- "\u5317\u7def35\u5ea639\u520629\u79d21572" replace_dohunbyo_kanji(y)
x <- "\u6771\u7d4c139\u5ea644\u520628\u79d28869" replace_dohunbyo_kanji(x) y <- "\u5317\u7def35\u5ea639\u520629\u79d21572" replace_dohunbyo_kanji(y)
Returns the value when the coordinates of ESPG:4326 given to the input are replaced with those of the Japan Plane Rectangular CS.
st_nearest_jgd2011(geometry) st_detect_jgd2011(geometry)
st_nearest_jgd2011(geometry) st_detect_jgd2011(geometry)
geometry |
geometry (POINT, EPSG:4326) |
st_nearest_jgd2011()
: It returns the coordinate system closest to
the given ground object. This is valid even when the coordinates are at sea.
st_detect_jgd2011()
: Identify the coordinate system in which
the given object is located.
numeric vector
https://www.gsi.go.jp/LAW/heimencho.html
require("sf") p <- st_sfc(sf::st_point(c(140.77, 36.8)), crs = 4326) st_nearest_jgd2011(p) st_detect_jgd2011(p) st_detect_jgd2011(st_sfc(sf::st_point(c(140.73, 36.8)), crs = 4326))
require("sf") p <- st_sfc(sf::st_point(c(140.77, 36.8)), crs = 4326) st_nearest_jgd2011(p) st_detect_jgd2011(p) st_detect_jgd2011(st_sfc(sf::st_point(c(140.73, 36.8)), crs = 4326))