Latitude and longitude are spherical coordinates on a unit circle. Each such coordinate tuple is transformed into a triple of Cartesian coordinates in Euclidean space.
This is first done for the presumed center point of the cell and then for all the corners of the cell. LLtoXYZ is defined in clipping/geometry.h
...
...
@@ -482,7 +488,6 @@ void verify_grid(int gridtype, int gridsize, int gridno, int ngrids, int ncorner
/* Checks if there are any duplicate vertices in the list of corners. Note that the last (additional) corner has not been set yet. */