proj4
Version:
Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.
23 lines • 1.01 kB
JavaScript
// Based on . CTABLE structure :
// FIXME: better to have array instead of object holding longitudes, latitudes members
// In the former case, one has to document index 0 is longitude and
// 1 is latitude ...
// In the later case, grid object gets bigger !!!!
// Solution 1 is chosen based on pj_gridinfo.c
exports.null = { // name of grid's file
"ll": [-3.14159265, - 1.57079633], // lower-left coordinates in radians (longitude, latitude):
"del": [3.14159265, 1.57079633], // cell's size in radians (longitude, latitude):
"lim": [3, 3], // number of nodes in longitude, latitude (including edges):
"count": 9, // total number of nodes
"cvs": [ // shifts : in ntv2 reverse order : lon, lat in radians ...
[],
[],
[], // for (lon= 0; lon<lim[0]; lon++) {
[],
[],
[], // for (lat= 0; lat<lim[1]; lat++) { p= cvs[lat*lim[0]+lon]; }
[],
[],
[] // }
]
};