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

EPSG:4479 used as geographic data: coordinates reach seven digits

Quick answer

EPSG:4479 is CGCS2000 geocentric Cartesian, returning X/Y/Z in metres rather than degrees. Passing those values to Cesium.Cartesian3.fromDegrees sends the camera off the globe and leaves a black screen.

Last verified 2026-11-03 · Multiple versions · Cite this page
Applies to: Tianditu API 4.0 · proj4js 2.11.x · Cesium 1.115
Symptom
Checklist
  1. Count the components: three values where the third is not a plausible height means geocentric XYZ.
  2. Check magnitude: geocentric coordinates all fall in the 2.0e6~6.4e6 range and stay below 6378137 plus height.
  3. Re-read the service documentation for the TILEMATRIXSET or SRS parameter and confirm 4490 is intended.
  4. Convert 4479 to 4490 with proj4 using an explicit geocent projection and check the result lands in China.
  5. Verify the rendering call: fromDegrees takes degrees, Cartesian3 takes metres.
Fix

Request 4490 only; if geocentric values arrive, convert them with proj4('+proj=geocent +datum=WGS84', 'EPSG:4490', [x,y,z]) before any renderer sees them.

Code
proj4.defs('EPSG:4479',
  '+proj=geocent +ellps=GRS80 +units=m +no_defs');
proj4.defs('EPSG:4490',
  '+proj=longlat +ellps=GRS80 +no_defs');

proj4('EPSG:4479', 'EPSG:4490', [-2177350, 4389500, 4070300]);
// => [116.3974, 39.9092]
const p = new Cesium.Cartesian3(-2177350, 4389500, 4070300);
viewer.camera.lookAt(p, new Cesium.Cartesian3(0, 0, 0));
// Cesium.Cartesian3.fromDegrees(116.3974, 39.9092, 50)
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). EPSG:4479 used as geographic data: coordinates reach seven digits. https://www.jingweizhi.com/en/cookbook/tdt-4490-4479.html (accessed 2026-11-03).