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.
Symptom
- Coordinates come back as -2177350, 4389500, 4070300 when TILEMATRIXSET=4479 is requested instead of degree values.
- Cesium.Cartesian3.fromDegrees(x, y, z) with those numbers flies the camera outside the Earth and the screen goes black.
- The same request with TILEMATRIXSET=4490 works normally and returns 116.397, 39.909.
Checklist
- Count the components: three values where the third is not a plausible height means geocentric XYZ.
- Check magnitude: geocentric coordinates all fall in the 2.0e6~6.4e6 range and stay below 6378137 plus height.
- Re-read the service documentation for the TILEMATRIXSET or SRS parameter and confirm 4490 is intended.
- Convert 4479 to 4490 with proj4 using an explicit geocent projection and check the result lands in China.
- 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
- Dividing the geocentric X and Y by 111320 as if they were degrees.
- Mixing Cartesian3 (metres, ECEF) with fromDegrees (degrees) in Cesium; no error is thrown, the camera just ends up elsewhere.
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
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).