gcjtowgs: GCJ02 to WGS84

Description Usage Arguments Value Examples

Description

Function to convert GCJ02 coordinates to WGS84 coordinates.

Geographic data from Baidu and coordinates in Baidu maps are BD09 coordinates. Geographic data from Chinese official websites and coordinates from Chinese map providers such as Gaode and QQ map are GCJ02 coordinates. GCJ02 coordinates is the first encryption applied to WGS84 coordinates. BD09 adds one more layer of encryption on top of GCJ02.

Usage

1
gcjtowgs(coordinates)

Arguments

coordinates

A vector of coordinate pair c(lat, lon)

Value

lat, lon

Examples

1
2
3
4
#Coordinate data from official websites eg. c(39.8673, 116.366)
#Convert to WGS84 coordinates

gcjtowgs(c(39.8673, 116.366))

versey-sherry/ChinaCoordinate documentation built on May 25, 2019, 9:25 a.m.