evil_transform v0.1.0 EvilTransform.Convertor
GCJ-02 and WGS-84 Transformation Flow.
Link to this section Summary
Functions
Convert GCJ-02 coordinate to WGS-84 coordinate
Convert WGS-84 coordinate to GCJ-02 coordinate
Link to this section Functions
Link to this function
do_gcjtowgs(geo, count)
Link to this function
do_wgstogcj(geo, invalid_latlng)
Link to this function
gcjtowgs(geo)
Convert GCJ-02 coordinate to WGS-84 coordinate.
Example
iex> geo = EvilTransform.Convertor.new_geo(22.59414209,114.1251447) iex> EvilTransform.gcjtowgs(geo) { %EvilTransform.Geo{…}, “22.59682824722656, 114.12004399199218” }
iex> EvilTransform.Convertor.new_geo(39.061111,121.787113) |> EvilTransform.gcjtowgs() { %EvilTransform.Geo{…}, “39.06008011621094, 121.78199886425783” }
Link to this function
new_geo(latitude, longitude)
Link to this function
wgstogcj(geo)
Convert WGS-84 coordinate to GCJ-02 coordinate.
Example
iex> geo = EvilTransform.Convertor.new_geo(31.280844,120.596931) iex> EvilTransform.Convertor.wgstogcj(geo) { %Geo{}, “31.278648624428175, 120.60109998322247” }