Atlaslog
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.

Last verified 2026-11-03 · Multiple versions · Cite this page
Applies to: Leaflet · OpenLayers · Cesium
Symptom
Checklist
  1. Identify the source CRS: device and government open data are usually WGS84, Amap API output is usually GCJ-02.
  2. Identify the basemap CRS: Tianditu is CGCS2000, Amap and Tencent are GCJ-02, Baidu is BD-09.
  3. If the two match, do not convert; if they differ, convert exactly once before rendering.
  4. Convert with gcoord.transform(data, 'WGS84', 'GCJ02') or an equivalent implementation and inspect one known point.
  5. 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
All 120 field notesChinese originalRunnable examples
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Cite this page

Atlaslog (2026). Coordinates shift hundreds of meters on Chinese basemaps. https://www.jingweizhi.com/en/cookbook/coordinate-offset.html (accessed 2026-11-03).