Geocoding: Geocoding from address to geometry

GeocodingR Documentation

Geocoding from address to geometry

Description

The function is used to conduct geocoding via TDX API. The result summary would be shown after geocoding, including number of success, fail of geocoding, as well as number of the duplicated address. Note that if the warning "Reconnect!" is shown after the progress bar, it does not imply that the address cannot be geocoded, but due to the "Request Timeout" error. The function would then automatically reconnect to TDX API.

Usage

Geocoding(access_token, address, dtype="text", out=F)

Arguments

access_token

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

address

Place the address in vector form.

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

The output would store the data frame of success geocoding result (DATA$SUCCESS), and a character with fail geocoding address (DATA$FAIL).

Some columns definition of success result are listed below.

AdressOriginal Address filled in.
AddressNew Address retrieved by the API.

Author(s)

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

Examples

# The ADDRESS should be typed in Chinese or a vector of Chinese address
address_geocoding=Geocoding(access_token, "ADDRESS")

# show the success geocoding result
address_geocoding$SUCCESS

ChiaJung-Yeh/NYCU_TDX documentation built on Aug. 28, 2024, 10:43 p.m.