Atlaslog
Atlaslog / Field Notes / Coordinates & projections
Field note · Coordinates & projections

UTM zone off by one shifts Xi'an 551 km east

Quick answer

The data was projected in UTM zone 49 but the layer declares zone 50. Each zone is 6 degrees of longitude apart, which at 34 degrees north equals 551 km, while the northing stays correct.

Last verified 2026-11-03 · Multiple versions · Cite this page
Applies to: proj4js 2.11.x · GeoServer 2.23 · QGIS 3.34
Symptom
Checklist
  1. Check x: the UTM false easting is 500000, so normal values sit in 160000~840000; negative or out-of-range x means the point crossed a zone.
  2. Check y to confirm the latitude is still right, which isolates the problem to the zone number.
  3. Compute the zone from longitude with floor(lon/6)+31 and compare it with the layer's declared EPSG code.
  4. Project the same point with the neighbouring zone and keep the one whose x is closest to 500000.
Fix

Declare the CRS the data was actually projected in (EPSG:32649 for 108.94 E), and split multi-zone datasets per zone or store them as longitude/latitude before ingestion.

Code
Math.floor(108.940174 / 6) + 31;   // 49  <- 正确
Math.floor(108.940174 / 6);        // 18  <- 少了 +31,EPSG:32618 是大西洋
const zone = 49;
const cm = zone * 6 - 183;         // 111  (度)
for (let z = 47; z <= 51; z++) {
  const epsg = 'EPSG:326' + z;
  const [x, y] = proj4('EPSG:4326', epsg, [108.940174, 34.341568]);
  console.log(z, x.toFixed(0), y.toFixed(0));
}
// 48:  -360400  3805200
// 50:  -241300  3804900
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). UTM zone off by one shifts Xi'an 551 km east. https://www.jingweizhi.com/en/cookbook/utm-zone-off-by-one.html (accessed 2026-11-03).