Atlaslog / Field Notes / Coordinates & projections
Field note · Coordinates & projections
Coordinates shift hundreds of meters on Chinese basemaps
Quick answer
GPS points land a few hundred meters from where they were recorded once drawn on Amap, Tencent or Baidu tiles. The shift is a systematic WGS84 to GCJ-02 (or BD-09) datum difference, not bad data: it ranges from about 265 m in Urumqi to 622 m in Guangzhou and changes direction with location.
Symptom
- A point collected at 116.397428, 39.909230 in Beijing appears at 116.403672, 39.910634, 555.6 m to the north-east.
- The offset measures 265.3 m in Urumqi, 481.8 m in Shanghai and 621.7 m in Guangzhou, and its direction rotates across the country.
- Every POI in a batch moves together, so a single point looks like a data-entry error until the whole layer is checked.
Checklist
- Identify the source CRS: device and government open data are usually WGS84, Amap API output is usually GCJ-02.
- Identify the basemap CRS: Tianditu is CGCS2000, Amap and Tencent are GCJ-02, Baidu is BD-09.
- If the two match, do not convert; if they differ, convert exactly once before rendering.
- Convert with gcoord.transform(data, 'WGS84', 'GCJ02') or an equivalent implementation and inspect one known point.
- Never hand-tune individual points after conversion; that turns a systematic error into random noise.
Fix
Run a single datum conversion on the way in, e.g. gcoord.transform(geojson, 'WGS84', 'GCJ02') for Amap/Tencent tiles, or WGS84 to GCJ-02 to BD-09 for Baidu. Reverse GCJ-02 to WGS84 has no analytic solution, so iterate until the residual is under 1 m.
Watch out
- Applying the popular 'add 0.0065' constant to GCJ-02: that constant only approximates the BD-09 step and leaves the 480 m GCJ-02 offset untouched.
- Converting twice because both server and client do it, which doubles the offset instead of cancelling it.
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Atlaslog (2026). Coordinates shift hundreds of meters on Chinese basemaps. https://www.jingweizhi.com/en/cookbook/coordinate-offset.html (accessed 2026-11-03).