/** @module src/km100 */
/** @constant
* @description This the array from which the default object is derived. If you
* need to work with an array of objects where the 100 km grid reference is a property
* of the object alongside x, y, and proj, you can use this.
* @type {array}
*/
export const a100km = [
{
"GridRef": "SV",
"x": 0,
"y": 0,
"proj": "gb"
},
{
"GridRef": "NL",
"x": 0,
"y": 7,
"proj": "gb"
},
{
"GridRef": "NF",
"x": 0,
"y": 8,
"proj": "gb"
},
{
"GridRef": "NA",
"x": 0,
"y": 9,
"proj": "gb"
},
{
"GridRef": "SW",
"x": 1,
"y": 0,
"proj": "gb"
},
{
"GridRef": "SR",
"x": 1,
"y": 1,
"proj": "gb"
},
{
"GridRef": "SM",
"x": 1,
"y": 2,
"proj": "gb"
},
{
"GridRef": "NW",
"x": 1,
"y": 5,
"proj": "gb"
},
{
"GridRef": "NR",
"x": 1,
"y": 6,
"proj": "gb"
},
{
"GridRef": "NM",
"x": 1,
"y": 7,
"proj": "gb"
},
{
"GridRef": "NG",
"x": 1,
"y": 8,
"proj": "gb"
},
{
"GridRef": "NB",
"x": 1,
"y": 9,
"proj": "gb"
},
{
"GridRef": "HW",
"x": 1,
"y": 10,
"proj": "gb"
},
{
"GridRef": "SX",
"x": 2,
"y": 0,
"proj": "gb"
},
{
"GridRef": "SS",
"x": 2,
"y": 1,
"proj": "gb"
},
{
"GridRef": "SN",
"x": 2,
"y": 2,
"proj": "gb"
},
{
"GridRef": "SH",
"x": 2,
"y": 3,
"proj": "gb"
},
{
"GridRef": "SC",
"x": 2,
"y": 4,
"proj": "gb"
},
{
"GridRef": "NX",
"x": 2,
"y": 5,
"proj": "gb"
},
{
"GridRef": "NS",
"x": 2,
"y": 6,
"proj": "gb"
},
{
"GridRef": "NN",
"x": 2,
"y": 7,
"proj": "gb"
},
{
"GridRef": "NH",
"x": 2,
"y": 8,
"proj": "gb"
},
{
"GridRef": "NC",
"x": 2,
"y": 9,
"proj": "gb"
},
{
"GridRef": "HX",
"x": 2,
"y": 10,
"proj": "gb"
},
{
"GridRef": "SY",
"x": 3,
"y": 0,
"proj": "gb"
},
{
"GridRef": "ST",
"x": 3,
"y": 1,
"proj": "gb"
},
{
"GridRef": "SO",
"x": 3,
"y": 2,
"proj": "gb"
},
{
"GridRef": "SJ",
"x": 3,
"y": 3,
"proj": "gb"
},
{
"GridRef": "SD",
"x": 3,
"y": 4,
"proj": "gb"
},
{
"GridRef": "NY",
"x": 3,
"y": 5,
"proj": "gb"
},
{
"GridRef": "NT",
"x": 3,
"y": 6,
"proj": "gb"
},
{
"GridRef": "NO",
"x": 3,
"y": 7,
"proj": "gb"
},
{
"GridRef": "NJ",
"x": 3,
"y": 8,
"proj": "gb"
},
{
"GridRef": "ND",
"x": 3,
"y": 9,
"proj": "gb"
},
{
"GridRef": "HY",
"x": 3,
"y": 10,
"proj": "gb"
},
{
"GridRef": "HT",
"x": 3,
"y": 11,
"proj": "gb"
},
{
"GridRef": "SZ",
"x": 4,
"y": 0,
"proj": "gb"
},
{
"GridRef": "SU",
"x": 4,
"y": 1,
"proj": "gb"
},
{
"GridRef": "SP",
"x": 4,
"y": 2,
"proj": "gb"
},
{
"GridRef": "SK",
"x": 4,
"y": 3,
"proj": "gb"
},
{
"GridRef": "SE",
"x": 4,
"y": 4,
"proj": "gb"
},
{
"GridRef": "NZ",
"x": 4,
"y": 5,
"proj": "gb"
},
{
"GridRef": "NU",
"x": 4,
"y": 6,
"proj": "gb"
},
{
"GridRef": "NK",
"x": 4,
"y": 8,
"proj": "gb"
},
{
"GridRef": "HZ",
"x": 4,
"y": 10,
"proj": "gb"
},
{
"GridRef": "HU",
"x": 4,
"y": 11,
"proj": "gb"
},
{
"GridRef": "HP",
"x": 4,
"y": 12,
"proj": "gb"
},
{
"GridRef": "TV",
"x": 5,
"y": 0,
"proj": "gb"
},
{
"GridRef": "TQ",
"x": 5,
"y": 1,
"proj": "gb"
},
{
"GridRef": "TL",
"x": 5,
"y": 2,
"proj": "gb"
},
{
"GridRef": "TF",
"x": 5,
"y": 3,
"proj": "gb"
},
{
"GridRef": "TA",
"x": 5,
"y": 4,
"proj": "gb"
},
{
"GridRef": "OV",
"x": 5,
"y": 5,
"proj": "gb"
},
{
"GridRef": "TR",
"x": 6,
"y": 1,
"proj": "gb"
},
{
"GridRef": "TM",
"x": 6,
"y": 2,
"proj": "gb"
},
{
"GridRef": "TG",
"x": 6,
"y": 3,
"proj": "gb"
},
{
"GridRef": "V",
"x": 0,
"y": 0,
"proj": "ir"
},
{
"GridRef": "Q",
"x": 0,
"y": 1,
"proj": "ir"
},
{
"GridRef": "L",
"x": 0,
"y": 2,
"proj": "ir"
},
{
"GridRef": "F",
"x": 0,
"y": 3,
"proj": "ir"
},
{
"GridRef": "A",
"x": 0,
"y": 4,
"proj": "ir"
},
{
"GridRef": "W",
"x": 1,
"y": 0,
"proj": "ir"
},
{
"GridRef": "R",
"x": 1,
"y": 1,
"proj": "ir"
},
{
"GridRef": "M",
"x": 1,
"y": 2,
"proj": "ir"
},
{
"GridRef": "G",
"x": 1,
"y": 3,
"proj": "ir"
},
{
"GridRef": "B",
"x": 1,
"y": 4,
"proj": "ir"
},
{
"GridRef": "X",
"x": 2,
"y": 0,
"proj": "ir"
},
{
"GridRef": "S",
"x": 2,
"y": 1,
"proj": "ir"
},
{
"GridRef": "N",
"x": 2,
"y": 2,
"proj": "ir"
},
{
"GridRef": "H",
"x": 2,
"y": 3,
"proj": "ir"
},
{
"GridRef": "C",
"x": 2,
"y": 4,
"proj": "ir"
},
{
"GridRef": "Y",
"x": 3,
"y": 0,
"proj": "ir"
},
{
"GridRef": "T",
"x": 3,
"y": 1,
"proj": "ir"
},
{
"GridRef": "O",
"x": 3,
"y": 2,
"proj": "ir"
},
{
"GridRef": "J",
"x": 3,
"y": 3,
"proj": "ir"
},
{
"GridRef": "D",
"x": 3,
"y": 4,
"proj": "ir"
},
{
"GridRef": "Z",
"x": 4,
"y": 0,
"proj": "ir"
},
{
"GridRef": "U",
"x": 4,
"y": 1,
"proj": "ir"
},
{
"GridRef": "P",
"x": 4,
"y": 2,
"proj": "ir"
},
{
"GridRef": "K",
"x": 4,
"y": 3,
"proj": "ir"
},
{
"GridRef": "E",
"x": 4,
"y": 4,
"proj": "ir"
},
{
"GridRef": "WV",
"x": 5,
"y": 54,
"proj": "ci"
},
{
"GridRef": "WA",
"x": 5,
"y": 55,
"proj": "ci"
}
]
/** @constant
* @description The default export from this module is an object with a property
* for every 100 km square reference for Britain (Brtish National Grid),
* Ireland (Irish National Grid) and the Channel Islands (abbreviated UTM 30N).
* Each grid reference references an object that has properties x, y and proj.
* The x and y coordinates represent the centroid of the 100 km square in the
* coordinate reference system corresponding to the aforementioned areas, respectively
* epsg:27700, epsg:29903 and epsg:32630. Another property, proj, indicates the region/CRS
* with two letter codes, respectively gb, ir and ci.
* <p>An example of the object referenced through the property 'SO' is shown below:</p>
* <pre>
* {
* "x": 3,
* "y": 2,
* "proj": "gb"
* }
* </pre>
* @type {object}
*/
export default a100km.reduce(function(acc, km100) {
acc[km100.GridRef] = {
x: km100.x,
y: km100.y,
proj: km100.proj
}
return acc
}, {})