gcj2bd: Convert coordinates

Description Usage Arguments Details Value Author(s) See Also Examples

Description

converts lat/lon coordintes from GCJ-02 to BD-09

Usage

1
gcj2bd(gcjLat, gcjLon)

Arguments

gcjLat

a numeric latitude in GCJ-02

gcjLon

a numeric longitude in GCJ-02

Details

BD-09 coordinate system is used by Baidu Maps and further encrypted based on GCJ-02 coordinates.

Value

a data.frame with variables lat/lng

Author(s)

Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University

See Also

bd2gcj, conv.

http://blog.csdn.net/coolypf/article/details/8569813 for C version source code.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# latitude/longitude coordinates of Beijing railway station
# GCJ-02: (39.90245, 116.42703)
# BD-09:  (39.90851, 116.43351)
gcj2bd(39.90245, 116.42703) # correct
# convert multiple coordinates
gcj2bd(c(39.99967, 39.98691), c(116.3264, 116.3059))

## End(Not run)

caijun/geoChina documentation built on May 13, 2019, 11 a.m.