Road_Network: Retrieve the geometry of road network

Road_NetworkR Documentation

Retrieve the geometry of road network

Description

The function is used to download the road network in Taiwan. This API can only retrieve the National Highway (RoadClass:0), Provincial Expressway (RoadClass:1), and Provincial Highway (RoadClass:3).

Usage

Road_Network(access_token, county, roadclass, dtype="text", out=F)

Arguments

access_token

Your access token given by TDX platform. This can be derived from the function get_token().

county

Please fill in the English county name. Checking out the appropriate county name in dataframe TDX_County. Note that if ALL is filled in, it would retrieve the geometry of all provided road network in Taiwan.

roadclass

Please fill in the road class code of the network. Checking out the appropriate road class code in dataframe TDX_RoadClass. Note that if ALL is used, it would retrieve all the road class.

dtype

The class of data, including text (data frame) and sf (simple feature). The default value is text.

out

If the result should be exported to the local, please fill in the directory. The default value is FALSE, which does not export the data. Note that the directory must contain ".shp" when exporting simple feature. And the directory must contain ".csv" or ".txt" when exporting text file.

Value

Codes of RoadClass are listed below.

0 National Highway
1 Provincial Expressway
3 Provincial Highway

Author(s)

Maintainer: Chia Jung, Yeh chia-jung.yeh@sydney.edu.au

Examples

# retrieve the National Highway in Taipei
Road_Network(access_token, "Taipei", 0)

# retrieve all road network in Hsinchu
Road_Network(access_token, "Hsinchu", "ALL", dtype="sf", out="./HsinchuRoadNetwork.shp")

# retrieve all Provincial Highway in Taiwan
Road_Network(access_token, "ALL", 3)

# retrieve all road network in Taiwan
Road_Network(access_token, "ALL", "ALL", dtype="sf", out="./TaiwanRoadNetwork.shp")

ChiaJung-Yeh/NYCU_TDX documentation built on Nov. 25, 2024, 6:57 a.m.