# Coordinate System

### From World Wind Wiki

Mkpl (Talk | contribs)

(New page: ===Coordinate System=== WWJ uses an [http://en.wikipedia.org/wiki/ECEF ECEF] Cartesian coordinate system. Conversions from geodetic (lat, lon, altitude) to Cartesian are computed in the gl...)

Next diff →

## Revision as of 19:18, 7 January 2008

### [edit] Coordinate System

WWJ uses an ECEF Cartesian coordinate system. Conversions from geodetic (lat, lon, altitude) to Cartesian are computed in the globe class (*EllipsodialGlobe.geodeticToCartesian(...)*), where the conversion is essentially applying an Equirectangular projection (or the reverse in the case of geodeticToCartesian()). WWJ uses WGS84 as a means to establish the center and orientation of the earth.

When performing custom transformations (in a *render()* method for example), the modelview matrix has been transformed to orient the axises to the center of the earth prior to the render call. It's easier to transform geometry using a local world origin, which is established by calling *View.pushReferenceCenter()* (the referenceCenter argument is in world coordinates). One must call *popReferenceCenter()* afterwards. A call to View.get*Matrix returns the same matrix as if I asked the opengl pipeline for it.

In WWJ the earth rotational axes is Y, with positive values in the northern hemisphere. Z points toward lat/lon zero and X toward lat zero, lon 90 east.