| Title: | Loads Spatial Data Sets of China |
|---|---|
| Description: | Providing various commonly used spatial data related to Chinese regions in the R programming environment. |
| Authors: | Wenbo Lyu [aut, cre] (ORCID: <https://orcid.org/0009-0002-6003-3800>) |
| Maintainer: | Wenbo Lyu <[email protected]> |
| License: | GPL-3 |
| Version: | 0.2.0 |
| Built: | 2026-05-25 07:12:19 UTC |
| Source: | https://github.com/stscl/geocn |
Returns a tibble with all datasets available in the geocn package.
list_geocn()list_geocn()
A tibble
list_geocn()list_geocn()
Loading the commonly used Albers Lambert projection in China region.
load_cn_alberproj(output = "sf")load_cn_alberproj(output = "sf")
output |
(optional) Output format, must be |
An Available Projection CRS.
load_cn_alberproj()load_cn_alberproj()
Loading China's Land Border Line and the 10-dash line of the South China Sea
load_cn_border()load_cn_border()
An sf object
cn_border = load_cn_border() cn_bordercn_border = load_cn_border() cn_border
Loading Chinese City-Level Administrative Division Polygon Data
load_cn_city(simplify = TRUE, keep = 0.05, keep_shape = TRUE, ...)load_cn_city(simplify = TRUE, keep = 0.05, keep_shape = TRUE, ...)
simplify |
(optional) Whether to simplify loading sf objects (default TRUE) |
keep |
(optional) Proportion of points to retain (0-1; default 0.05) |
keep_shape |
(optional) Prevent small polygon features from disappearing at high simplification (default TRUE) |
... |
(optional) Other arguments passed to |
Whether to simplify loading sf objects
library(sf) city = load_cn_city() citylibrary(sf) city = load_cn_city() city
Loading Coastline of China
load_cn_coastline()load_cn_coastline()
An sf object
cn_coastline = load_cn_coastline() cn_coastlinecn_coastline = load_cn_coastline() cn_coastline
Loading Chinese County-Level Administrative Division Polygon Data
load_cn_county(simplify = TRUE, keep = 0.05, keep_shape = TRUE, ...)load_cn_county(simplify = TRUE, keep = 0.05, keep_shape = TRUE, ...)
simplify |
(optional) Whether to simplify loading sf objects (default TRUE) |
keep |
(optional) Proportion of points to retain (0-1; default 0.05) |
keep_shape |
(optional) Prevent small polygon features from disappearing at high simplification (default TRUE) |
... |
(optional) Other arguments passed to |
Whether to simplify loading sf objects
library(sf) county = load_cn_county() countylibrary(sf) county = load_cn_county() county
Loading China's Land Border
load_cn_landborder()load_cn_landborder()
An sf object
cn_landborder = load_cn_landborder() cn_landbordercn_landborder = load_cn_landborder() cn_landborder
Loading China's Land Border and Coastline
load_cn_landcoast()load_cn_landcoast()
An sf object
cn_landcoast = load_cn_landcoast() cn_landcoastcn_landcoast = load_cn_landcoast() cn_landcoast
Loading Chinese Province-Level Administrative Divisional Polygon Data
load_cn_province(simplify = TRUE, keep = 0.05, keep_shape = TRUE, ...)load_cn_province(simplify = TRUE, keep = 0.05, keep_shape = TRUE, ...)
simplify |
(optional) Whether to simplify loading sf objects (default TRUE) |
keep |
(optional) Proportion of points to retain (0-1; default 0.05) |
keep_shape |
(optional) Prevent small polygon features from disappearing at high simplification (default TRUE) |
... |
(optional) Other arguments passed to |
Whether to simplify loading sf objects
library(sf) province = load_cn_province() provincelibrary(sf) province = load_cn_province() province
Loading the 10-dash line of the South China Sea
load_cn_tenline()load_cn_tenline()
An sf object
cn_tenline = load_cn_tenline() cn_tenlinecn_tenline = load_cn_tenline() cn_tenline
Loading the Boundary Polygon Data of Loess Plateau
load_loess_plateau()load_loess_plateau()
An sf object
load_loess_plateau()load_loess_plateau()
Loading the Boundary Polygon Data of Tibetan Plateau
load_tibetan_plateau()load_tibetan_plateau()
An sf object
load_tibetan_plateau()load_tibetan_plateau()
Loading the Boundary Polygon Data of Weihe River Basin
load_weihe_basin()load_weihe_basin()
An sf object
load_weihe_basin()load_weihe_basin()
Loading Global Coastlines
load_world_coastline()load_world_coastline()
An sf object
load_world_coastline()load_world_coastline()
Loading Global Continents
load_world_continent()load_world_continent()
An sf object
load_world_continent()load_world_continent()
Load Global Country Boundaries
load_world_country(center = "west")load_world_country(center = "west")
center |
(optional) Center must be |
When the center parameter is set to west, the map center is the Atlantic Ocean;
and when center is east, the map center is the Pacific Ocean.
An sf object
load_world_country()load_world_country()
Loading Global Lakes
load_world_lake()load_world_lake()
An sf object
load_world_lake()load_world_lake()
Loading Global Oceans
load_world_ocean()load_world_ocean()
An sf object
load_world_ocean()load_world_ocean()
Loading Global Rivers
load_world_river()load_world_river()
An sf object
load_world_river()load_world_river()
Loading the Boundary Polygon Data of Yangtze River Basin
load_yangtze_basin()load_yangtze_basin()
An sf object
load_yangtze_basin()load_yangtze_basin()
Loading the Boundary Polygon Data of Yellow River Basin
load_yellow_river_basin()load_yellow_river_basin()
An sf object
load_yellow_river_basin()load_yellow_river_basin()
Coordinate Conversion Between GCJ02,BD09 and WGS84
st_transform_cn(lon, lat, from = "gcj", to = "wgs")st_transform_cn(lon, lat, from = "gcj", to = "wgs")
lon |
Longitude vector. |
lat |
Latitude vector. |
from |
(optional) Source CRS. Default is |
to |
(optional) Target CRS. Default is |
wgs stands for WGS84 coordinate system, gcj stands for GCJ02 coordinate system,
and bd stands for BD09 coordinate system.
A coordinate tibble in the target CRS.
lon = c(126.626510,126.625261,126.626378,126.626541,126.626721,126.627732,126.626510) lat = c(45.731596,45.729834,45.729435,45.729676,45.729604,45.730915,45.731596) st_transform_cn(lon,lat)lon = c(126.626510,126.625261,126.626378,126.626541,126.626721,126.627732,126.626510) lat = c(45.731596,45.729834,45.729435,45.729676,45.729604,45.730915,45.731596) st_transform_cn(lon,lat)