diff --git a/en/images/kriging-clustered.png b/en/images/kriging-clustered.png new file mode 100644 index 00000000000..7b232fd48ba Binary files /dev/null and b/en/images/kriging-clustered.png differ diff --git a/en/images/kriging-dense.png b/en/images/kriging-dense.png new file mode 100644 index 00000000000..eb68c1dbd73 Binary files /dev/null and b/en/images/kriging-dense.png differ diff --git a/en/output/index.txt b/en/output/index.txt index 30860f0eb72..337b7295b89 100644 --- a/en/output/index.txt +++ b/en/output/index.txt @@ -16,6 +16,7 @@ idw imagemaps kerneldensity + kriging ogr_output pdf svg diff --git a/en/output/kriging-example/cities_major.csv b/en/output/kriging-example/cities_major.csv new file mode 100644 index 00000000000..05167fdf513 --- /dev/null +++ b/en/output/kriging-example/cities_major.csv @@ -0,0 +1,7 @@ +wkt,city,annual_mm,elevation_m,weight,label +POINT(174.76 -36.85),Auckland,1169,35,39,Auckland 1169 mm +POINT(174.78 -41.29),Wellington,763,3,25,Wellington 763 mm +POINT(173.28 -41.27),Nelson,1181,4,39,Nelson 1181 mm +POINT(171.21 -42.45),Greymouth,2833,6,94,Greymouth 2833 mm +POINT(172.64 -43.53),Christchurch,531,11,18,Christchurch 531 mm +POINT(168.66 -45.03),Queenstown,1496,318,50,Queenstown 1496 mm diff --git a/en/output/kriging-example/grid_nz_clustered.csv b/en/output/kriging-example/grid_nz_clustered.csv new file mode 100644 index 00000000000..487a21d2faf --- /dev/null +++ b/en/output/kriging-example/grid_nz_clustered.csv @@ -0,0 +1,64 @@ +wkt,annual_mm,elevation_m,weight +POINT(169.737 -46.353),860,23,29 +POINT(169.792 -46.063),956,237,32 +POINT(170.137 -45.916),939,29,31 +POINT(169.536 -45.712),1435,390,48 +POINT(169.858 -45.614),982,948,33 +POINT(170.185 -45.644),713,289,24 +POINT(170.433 -45.609),781,545,26 +POINT(169.711 -45.302),776,840,26 +POINT(170.107 -45.302),750,1080,25 +POINT(170.465 -45.346),723,393,24 +POINT(170.763 -45.356),950,329,32 +POINT(170.432 -44.945),965,738,32 +POINT(171.978 -43.889),606,63,20 +POINT(171.834 -43.636),781,191,26 +POINT(172.288 -43.567),704,97,23 +POINT(172.521 -43.606),558,18,19 +POINT(171.883 -43.172),1344,567,45 +POINT(172.295 -43.122),1312,876,44 +POINT(172.646 -43.123),786,123,26 +POINT(172.195 -42.932),1212,1051,40 +POINT(172.53 -42.808),1083,570,36 +POINT(172.983 -42.769),562,218,19 +POINT(173.251 -42.904),698,32,23 +POINT(172.557 -42.537),1033,499,34 +POINT(173.923 -41.502),684,12,23 +POINT(174.97 -41.361),1002,398,33 +POINT(175.367 -41.392),840,300,28 +POINT(174.302 -41.132),1006,118,34 +POINT(174.992 -41.09),1308,321,44 +POINT(175.408 -41.079),1337,79,45 +POINT(175.766 -41.18),892,476,30 +POINT(175.475 -40.804),2763,927,92 +POINT(174.773 -38.603),1729,38,58 +POINT(175.041 -38.732),1495,261,50 +POINT(175.439 -38.696),1855,629,62 +POINT(175.797 -38.575),1231,474,41 +POINT(176.017 -38.661),1064,530,35 +POINT(175.092 -38.377),1315,177,44 +POINT(175.461 -38.3),1915,471,64 +POINT(175.777 -38.389),1403,214,47 +POINT(176.051 -38.212),1615,621,54 +POINT(176.525 -38.353),1261,522,42 +POINT(176.776 -38.257),1489,242,50 +POINT(175.012 -37.955),1682,347,56 +POINT(175.383 -37.866),1332,58,44 +POINT(175.818 -37.976),1349,107,45 +POINT(176.175 -37.983),1791,486,60 +POINT(176.525 -37.953),1687,227,56 +POINT(176.819 -38.013),1490,8,50 +POINT(175.13 -37.597),1215,133,40 +POINT(175.394 -37.545),1291,21,43 +POINT(175.726 -37.644),1301,30,43 +POINT(174.721 -37.205),1354,19,45 +POINT(174.963 -37.294),1234,4,41 +POINT(175.312 -37.208),1204,58,40 +POINT(175.836 -37.272),1489,65,50 +POINT(174.621 -36.813),1206,58,40 +POINT(175.065 -36.917),1289,30,43 +POINT(175.739 -36.876),1339,165,45 +POINT(174.274 -36.593),1104,48,37 +POINT(174.69 -36.637),1123,17,37 +POINT(174.42 -36.121),1323,134,44 +POINT(174.662 -36.282),1383,88,46 diff --git a/en/output/kriging-example/grid_nz_regular.csv b/en/output/kriging-example/grid_nz_regular.csv new file mode 100644 index 00000000000..60d6abf3121 --- /dev/null +++ b/en/output/kriging-example/grid_nz_regular.csv @@ -0,0 +1,239 @@ +wkt,annual_mm,elevation_m,weight +POINT(167.657 -47.058),2438,253,81 +POINT(168.127 -47.024),1249,151,42 +POINT(167.716 -46.766),2400,194,80 +POINT(169.083 -46.62),1300,224,43 +POINT(168.33 -46.269),1434,28,48 +POINT(168.676 -46.42),1296,49,43 +POINT(169.012 -46.278),1507,185,50 +POINT(169.434 -46.314),1063,507,35 +POINT(169.737 -46.353),860,23,29 +POINT(166.609 -46.043),5024,24,167 +POINT(167.057 -45.988),3846,661,128 +POINT(167.313 -46.037),2123,157,71 +POINT(167.734 -46.075),1745,40,58 +POINT(167.993 -45.997),1380,179,46 +POINT(168.407 -46.015),1542,206,51 +POINT(168.787 -45.975),1150,133,38 +POINT(169.05 -46.052),1087,152,36 +POINT(169.424 -45.951),1104,472,37 +POINT(169.792 -46.063),956,237,32 +POINT(170.137 -45.916),939,29,31 +POINT(166.616 -45.728),5242,319,175 +POINT(167.006 -45.721),4172,913,139 +POINT(167.336 -45.566),3693,801,123 +POINT(167.729 -45.634),1988,299,66 +POINT(168.071 -45.617),1539,454,51 +POINT(168.319 -45.654),1498,257,50 +POINT(168.775 -45.623),1436,501,48 +POINT(169.08 -45.726),1401,604,47 +POINT(169.536 -45.712),1435,390,48 +POINT(169.858 -45.614),982,948,33 +POINT(170.185 -45.644),713,289,24 +POINT(170.433 -45.609),781,545,26 +POINT(167.047 -45.382),5228,1116,174 +POINT(167.434 -45.318),3170,483,106 +POINT(167.746 -45.331),2087,203,70 +POINT(168.005 -45.239),2072,1348,69 +POINT(168.489 -45.348),1645,829,55 +POINT(168.692 -45.365),1695,370,56 +POINT(169.026 -45.352),1477,1376,49 +POINT(169.507 -45.221),684,321,23 +POINT(169.711 -45.302),776,840,26 +POINT(170.107 -45.302),750,1080,25 +POINT(170.465 -45.346),723,393,24 +POINT(170.763 -45.356),950,329,32 +POINT(167.623 -45.004),5585,1010,186 +POINT(168.094 -44.946),2703,1095,90 +POINT(168.322 -45.005),2144,1833,71 +POINT(168.8 -44.98),1307,449,44 +POINT(169.118 -44.889),1266,1525,42 +POINT(169.41 -44.911),1049,383,35 +POINT(169.872 -44.916),836,511,28 +POINT(170.162 -44.864),935,1201,31 +POINT(170.432 -44.945),965,738,32 +POINT(170.85 -44.915),713,93,24 +POINT(167.744 -44.678),5571,458,186 +POINT(168.092 -44.513),5634,576,188 +POINT(168.477 -44.571),3871,1606,129 +POINT(168.824 -44.532),2435,1547,81 +POINT(169.14 -44.593),1448,278,48 +POINT(169.392 -44.559),1429,1320,48 +POINT(169.808 -44.585),1120,726,37 +POINT(170.19 -44.513),858,470,29 +POINT(170.463 -44.622),795,847,26 +POINT(170.929 -44.62),848,824,28 +POINT(168.355 -44.34),5052,1010,168 +POINT(168.713 -44.336),4256,1378,142 +POINT(169.18 -44.172),3950,1583,132 +POINT(169.481 -44.169),2716,1628,91 +POINT(169.802 -44.212),1992,1189,66 +POINT(170.075 -44.277),1285,459,43 +POINT(170.494 -44.202),989,532,33 +POINT(170.823 -44.281),1097,361,37 +POINT(171.147 -44.337),648,79,22 +POINT(169.023 -43.937),4448,158,148 +POINT(169.455 -43.987),4803,254,160 +POINT(169.829 -43.827),4849,1518,162 +POINT(170.105 -43.877),2100,841,70 +POINT(170.446 -43.931),1258,764,42 +POINT(170.931 -43.843),1381,932,46 +POINT(171.245 -43.838),1233,351,41 +POINT(171.59 -43.907),844,135,28 +POINT(171.978 -43.889),606,63,20 +POINT(169.505 -43.636),4848,11,162 +POINT(169.761 -43.609),6520,1175,217 +POINT(170.133 -43.488),5820,1849,194 +POINT(170.454 -43.521),4379,1958,146 +POINT(170.795 -43.622),1907,946,64 +POINT(171.206 -43.519),1344,745,45 +POINT(171.595 -43.637),1295,350,43 +POINT(171.834 -43.636),781,191,26 +POINT(172.288 -43.567),704,97,23 +POINT(172.521 -43.606),558,18,19 +POINT(170.464 -43.189),5388,234,180 +POINT(170.795 -43.125),6018,803,201 +POINT(171.205 -43.126),3180,1235,106 +POINT(171.496 -43.133),1988,794,66 +POINT(171.883 -43.172),1344,567,45 +POINT(172.295 -43.122),1312,876,44 +POINT(172.646 -43.123),786,123,26 +POINT(171.282 -42.913),5451,1508,182 +POINT(171.549 -42.787),4428,1193,148 +POINT(171.947 -42.775),3249,1392,108 +POINT(172.195 -42.932),1212,1051,40 +POINT(172.53 -42.808),1083,570,36 +POINT(172.983 -42.769),562,218,19 +POINT(173.251 -42.904),698,32,23 +POINT(171.276 -42.489),2833,100,94 +POINT(171.501 -42.539),2893,229,96 +POINT(171.832 -42.43),2420,914,81 +POINT(172.306 -42.425),1705,1461,57 +POINT(172.557 -42.537),1033,499,34 +POINT(172.864 -42.478),1052,874,35 +POINT(173.269 -42.461),1013,386,34 +POINT(173.569 -42.43),992,92,33 +POINT(171.534 -42.225),2349,261,78 +POINT(171.908 -42.063),2070,287,69 +POINT(172.227 -42.065),1975,667,66 +POINT(172.649 -42.181),1678,1566,56 +POINT(173.014 -42.09),801,1004,27 +POINT(173.286 -42.124),708,966,24 +POINT(173.639 -42.09),1120,508,37 +POINT(171.469 -41.752),2506,37,84 +POINT(171.947 -41.791),2590,453,86 +POINT(172.325 -41.74),1536,384,51 +POINT(172.584 -41.777),1569,432,52 +POINT(172.884 -41.776),1166,712,39 +POINT(173.239 -41.762),1158,820,39 +POINT(173.621 -41.871),969,722,32 +POINT(173.927 -41.814),1026,718,34 +POINT(172.237 -41.521),3441,339,115 +POINT(172.561 -41.369),1384,789,46 +POINT(172.958 -41.435),1164,270,39 +POINT(173.359 -41.378),1674,658,56 +POINT(173.656 -41.403),1112,992,37 +POINT(173.923 -41.502),684,12,23 +POINT(174.97 -41.361),1002,398,33 +POINT(175.367 -41.392),840,300,28 +POINT(172.32 -41.174),3033,420,101 +POINT(172.571 -41.046),2235,853,74 +POINT(172.909 -41.127),1226,452,41 +POINT(174.302 -41.132),1006,118,34 +POINT(174.992 -41.09),1308,321,44 +POINT(175.408 -41.079),1337,79,45 +POINT(175.766 -41.18),892,476,30 +POINT(176.041 -41.094),826,75,28 +POINT(172.283 -40.783),2574,217,86 +POINT(172.557 -40.824),2743,369,91 +POINT(175.475 -40.804),2763,927,92 +POINT(175.707 -40.797),1483,333,49 +POINT(176.107 -40.761),955,243,32 +POINT(175.383 -40.418),1366,27,46 +POINT(175.784 -40.338),1137,394,38 +POINT(176.095 -40.368),1040,353,35 +POINT(176.391 -40.43),1068,232,36 +POINT(175.089 -40.013),1087,28,36 +POINT(175.367 -39.984),1201,196,40 +POINT(175.725 -40.066),1165,375,39 +POINT(176.152 -40.026),1622,645,54 +POINT(176.373 -40.121),998,608,33 +POINT(176.773 -40.085),1021,369,34 +POINT(174.781 -39.777),1055,14,35 +POINT(175.08 -39.679),1073,251,36 +POINT(175.323 -39.771),1069,115,36 +POINT(175.719 -39.746),1097,568,37 +POINT(176.188 -39.633),1341,903,45 +POINT(176.431 -39.635),1119,295,37 +POINT(176.869 -39.687),878,46,29 +POINT(173.956 -39.327),2590,379,86 +POINT(174.37 -39.264),1251,221,42 +POINT(174.761 -39.349),1509,521,50 +POINT(175.09 -39.388),1373,99,46 +POINT(175.372 -39.375),1627,663,54 +POINT(175.756 -39.409),1307,899,44 +POINT(176.121 -39.346),1229,980,41 +POINT(176.539 -39.407),1581,225,53 +POINT(176.852 -39.428),1004,1,33 +POINT(174.642 -39.082),1567,173,52 +POINT(174.994 -38.945),1419,194,47 +POINT(175.407 -39.014),2374,595,79 +POINT(175.762 -39.056),2252,827,75 +POINT(176.18 -39.006),1899,1105,63 +POINT(176.491 -39.051),1219,1252,41 +POINT(176.806 -39.079),1551,568,52 +POINT(177.079 -39.067),1351,239,45 +POINT(177.438 -38.951),1285,55,43 +POINT(177.864 -38.917),1876,374,63 +POINT(174.773 -38.603),1729,38,58 +POINT(175.041 -38.732),1495,261,50 +POINT(175.439 -38.696),1855,629,62 +POINT(175.797 -38.575),1231,474,41 +POINT(176.017 -38.661),1064,530,35 +POINT(176.394 -38.725),1478,620,49 +POINT(176.828 -38.638),1729,447,58 +POINT(177.124 -38.707),2172,877,72 +POINT(177.434 -38.735),1806,404,60 +POINT(177.883 -38.687),1218,67,41 +POINT(175.092 -38.377),1315,177,44 +POINT(175.461 -38.3),1915,471,64 +POINT(175.777 -38.389),1403,214,47 +POINT(176.051 -38.212),1615,621,54 +POINT(176.525 -38.353),1261,522,42 +POINT(176.776 -38.257),1489,242,50 +POINT(177.197 -38.373),1853,695,62 +POINT(177.523 -38.379),1815,679,60 +POINT(177.841 -38.34),1776,238,59 +POINT(178.262 -38.276),1722,17,57 +POINT(175.012 -37.955),1682,347,56 +POINT(175.383 -37.866),1332,58,44 +POINT(175.818 -37.976),1349,107,45 +POINT(176.175 -37.983),1791,486,60 +POINT(176.525 -37.953),1687,227,56 +POINT(176.819 -38.013),1490,8,50 +POINT(177.415 -38.019),1881,69,63 +POINT(177.78 -37.951),3055,432,102 +POINT(178.258 -37.928),1961,106,65 +POINT(175.13 -37.597),1215,133,40 +POINT(175.394 -37.545),1291,21,43 +POINT(175.726 -37.644),1301,30,43 +POINT(178.135 -37.656),2844,331,95 +POINT(174.721 -37.205),1354,19,45 +POINT(174.963 -37.294),1234,4,41 +POINT(175.312 -37.208),1204,58,40 +POINT(175.836 -37.272),1489,65,50 +POINT(174.621 -36.813),1206,58,40 +POINT(175.065 -36.917),1289,30,43 +POINT(175.739 -36.876),1339,165,45 +POINT(174.274 -36.593),1104,48,37 +POINT(174.69 -36.637),1123,17,37 +POINT(174.42 -36.121),1323,134,44 +POINT(174.662 -36.282),1383,88,46 +POINT(173.584 -35.764),1665,144,56 +POINT(174.078 -35.855),1149,284,38 +POINT(174.402 -35.875),1132,8,38 +POINT(173.561 -35.453),1515,66,50 +POINT(173.969 -35.534),1102,147,37 +POINT(174.378 -35.543),1234,158,41 +POINT(173.372 -35.163),1350,73,45 +POINT(173.92 -35.21),1385,76,46 diff --git a/en/output/kriging-example/nz_coast.geojson b/en/output/kriging-example/nz_coast.geojson new file mode 100644 index 00000000000..8cf9bdd528a --- /dev/null +++ b/en/output/kriging-example/nz_coast.geojson @@ -0,0 +1,14 @@ +{ +"type": "FeatureCollection", +"name": "nz_coast", +"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, +"features": [ +{"type":"Feature","properties":{"scalerank":0,"featurecla":"Land","min_zoom":0.0},"geometry":{"type":"Polygon","coordinates":[[[173.269433593750023,-34.934765625000011],[173.284570312500023,-34.980566406250006],[173.339941406250034,-34.947949218750011],[173.447851562500034,-34.844335937500006],[173.438671875000011,-34.928515625],[173.47265625,-34.946972656250011],[173.69375,-35.005664062500003],[173.7392578125,-35.054589843750009],[173.786230468750034,-35.068554687500011],[173.843945312500011,-35.026269531250009],[174.10400390625,-35.142871093750003],[174.118945312500045,-35.17236328125],[174.11875,-35.262890625000011],[174.143164062500034,-35.3],[174.203222656250034,-35.30859375],[174.282910156250011,-35.253515625],[174.3203125,-35.246679687500006],[174.384960937500011,-35.367089843750009],[174.464746093750023,-35.4541015625],[174.54345703125,-35.58203125],[174.508593750000045,-35.667382812500009],[174.580664062500034,-35.785546875],[174.533496093750045,-35.79375],[174.391015625000023,-35.773730468750003],[174.395800781250045,-35.79736328125],[174.478710937500011,-35.884082031250003],[174.604882812500023,-36.08056640625],[174.802148437500023,-36.309472656250009],[174.7724609375,-36.390917968750003],[174.777050781250011,-36.444628906250003],[174.751757812500045,-36.490820312500006],[174.819238281250023,-36.612109375],[174.777148437500045,-36.649804687500009],[174.749218750000011,-36.774023437500006],[174.718652343750023,-36.795800781250009],[174.722460937500045,-36.841210937500009],[174.849902343750045,-36.87255859375],[174.891406250000045,-36.909375],[174.917187500000011,-36.865039062500003],[174.952050781250023,-36.852929687500009],[175.047070312500011,-36.912207031250006],[175.299511718750011,-36.993261718750006],[175.326464843750045,-37.040917968750009],[175.3466796875,-37.156152343750009],[175.385351562500034,-37.206933593750009],[175.4609375,-37.216699218750009],[175.54248046875,-37.201367187500011],[175.568164062500045,-37.159375],[175.551953125000011,-37.046484375],[175.4931640625,-36.86572265625],[175.501269531250045,-36.748046875],[175.487402343750034,-36.689550781250006],[175.426367187500034,-36.591894531250006],[175.385546875000045,-36.556347656250011],[175.399804687500023,-36.50078125],[175.460839843750023,-36.475683593750006],[175.528027343750011,-36.579296875000011],[175.681445312500045,-36.746972656250009],[175.772167968750011,-36.73515625],[175.780664062500023,-36.804589843750009],[175.842187500000023,-36.875097656250006],[175.876171875000011,-36.957714843750011],[175.921093750000011,-37.20458984375],[175.990136718750023,-37.43701171875],[176.114550781250045,-37.538281250000011],[176.129003906250034,-37.58671875],[176.053320312500034,-37.561718750000011],[176.029882812500034,-37.576269531250006],[176.037890625000045,-37.600683593750006],[176.1083984375,-37.645117187500006],[176.291699218750011,-37.680078125],[176.77001953125,-37.8896484375],[177.161816406250011,-37.985742187500009],[177.274023437500034,-37.993457031250003],[177.453320312500011,-37.957421875],[177.558300781250011,-37.8974609375],[177.727343750000045,-37.70556640625],[178.009179687500023,-37.554882812500011],[178.272167968750011,-37.56689453125],[178.536230468750034,-37.692089843750011],[178.516015625000023,-37.757617187500003],[178.393945312500023,-37.960253906250003],[178.3154296875,-38.444042968750011],[178.267675781250034,-38.551171875],[178.1806640625,-38.633691406249994],[178.084863281250023,-38.693945312500006],[177.976171875000034,-38.722265625],[177.93212890625,-38.860253906249994],[177.910351562500011,-39.021777343750017],[177.916601562500034,-39.062402343749994],[177.951367187500011,-39.094531250000017],[177.965625,-39.142480468749994],[177.908789062500034,-39.239550781250017],[177.87548828125,-39.225488281249994],[177.828710937500034,-39.144726562500011],[177.7861328125,-39.1109375],[177.52294921875,-39.073828125],[177.407519531250045,-39.081152343750006],[177.296582031250011,-39.115820312500006],[177.076757812500034,-39.221777343750006],[176.9541015625,-39.367578125],[176.939257812500045,-39.555273437500006],[176.966601562500045,-39.605175781250011],[177.10986328125,-39.673144531250017],[176.842187500000023,-40.1578125],[176.688769531250045,-40.29345703125],[176.611523437500011,-40.441992187500006],[176.385156250000023,-40.667675781250011],[176.251757812500045,-40.876855468749994],[175.98291015625,-41.21328125],[175.687304687500045,-41.41171875],[175.309765625000011,-41.610644531250017],[175.22216796875,-41.574414062500011],[175.165625,-41.417382812499994],[175.053906250000011,-41.391210937500006],[174.906054687500045,-41.432910156250017],[174.88134765625,-41.424023437500011],[174.875,-41.278222656249994],[174.900195312500045,-41.24267578125],[174.865625,-41.223046875],[174.83154296875,-41.230761718750017],[174.819726562500023,-41.262890625000011],[174.841210937500023,-41.290722656250011],[174.757031250000011,-41.325292968750006],[174.669531250000034,-41.326269531250006],[174.642968750000023,-41.312695312500011],[174.635351562500034,-41.289453125],[174.684863281250045,-41.217675781249994],[174.847753906250034,-41.058789062500011],[175.016796875000011,-40.84765625],[175.1625,-40.62158203125],[175.254101562500011,-40.289355468750017],[175.155957031250011,-40.114941406250011],[175.00927734375,-39.9521484375],[174.813769531250045,-39.860156250000017],[174.687304687500045,-39.84716796875],[174.567480468750034,-39.81298828125],[174.35205078125,-39.643359375000017],[173.934375,-39.509082031250017],[173.812109375000034,-39.42578125],[173.763671875,-39.31875],[173.781640625000023,-39.211230468750017],[173.844335937500034,-39.139355468750011],[174.071386718750034,-39.03125],[174.3984375,-38.962597656250011],[174.566210937500045,-38.841601562500017],[174.597363281250011,-38.785058593749994],[174.653027343750011,-38.428320312500006],[174.71533203125,-38.2255859375],[174.809277343750011,-38.099804687500011],[174.840039062500011,-38.022656250000011],[174.801660156250023,-37.8955078125],[174.836816406250023,-37.848925781250003],[174.928027343750045,-37.804492187500003],[174.845996093750045,-37.68515625],[174.729199218750011,-37.44873046875],[174.767675781250034,-37.339062500000011],[174.707421875000023,-37.325292968750006],[174.585839843750023,-37.097753906250006],[174.609667968750045,-37.069921875],[174.65966796875,-37.088769531250009],[174.734277343750023,-37.215234375],[174.746386718750045,-37.150097656250011],[174.803613281250023,-37.110058593750011],[174.928906250000011,-37.084765625],[174.782031250000045,-36.94375],[174.601464843750023,-36.985742187500009],[174.4755859375,-36.94189453125],[174.381933593750034,-36.725976562500009],[174.188867187500023,-36.492285156250006],[174.245703125000034,-36.484960937500006],[174.401562500000011,-36.601953125],[174.454296875000011,-36.5107421875],[174.446875,-36.450878906250011],[174.409570312500023,-36.405566406250003],[174.354101562500034,-36.3759765625],[174.353125,-36.322851562500006],[174.395410156250023,-36.274121093750011],[174.392773437500011,-36.240039062500003],[174.303515625000045,-36.170507812500006],[174.267871093750045,-36.1630859375],[174.252050781250034,-36.195605468750003],[174.277539062500011,-36.24375],[174.253710937500045,-36.249121093750006],[174.036425781250045,-36.122460937500009],[173.914453125000023,-35.90869140625],[173.917285156250045,-36.018164062500006],[174.003125,-36.146289062500003],[174.166406250000023,-36.32763671875],[174.145800781250045,-36.376953125],[174.097460937500045,-36.391015625],[174.0546875,-36.359765625],[173.945117187500045,-36.175878906250006],[173.412207031250034,-35.542578125],[173.480273437500045,-35.458984375],[173.585839843750023,-35.388574218750009],[173.626171875000011,-35.319140625],[173.581640625000034,-35.312597656250006],[173.49609375,-35.3623046875],[173.376367187500023,-35.500097656250006],[173.31396484375,-35.443359375],[173.274511718750034,-35.339648437500003],[173.228125,-35.33125],[173.11669921875,-35.205273437500011],[173.188769531250045,-35.123730468750011],[173.190625,-35.016210937500006],[173.029589843750045,-34.799902343750006],[172.705957031250023,-34.455175781250006],[173.0439453125,-34.429101562500009],[172.963769531250023,-34.53515625],[173.171093750000011,-34.806933593750003],[173.18125,-34.852734375000011],[173.269433593750023,-34.934765625000011]]]}}, +{"type":"Feature","properties":{"scalerank":0,"featurecla":"Land","min_zoom":0.0},"geometry":{"type":"Polygon","coordinates":[[[173.115332031250034,-41.279296875],[173.230859375000023,-41.2841796875],[173.737890625000034,-40.988964843750011],[173.897558593750034,-40.95078125],[173.947167968750023,-40.924121093750017],[174.00244140625,-40.917773437500017],[173.952832031250011,-40.98486328125],[173.889843750000011,-41.007226562499994],[173.8798828125,-41.031445312500011],[173.915136718750034,-41.070117187500017],[173.8603515625,-41.124414062499994],[173.862402343750034,-41.192089843750011],[173.7978515625,-41.27197265625],[173.897070312500034,-41.239355468750006],[173.933398437500045,-41.187304687500017],[173.914648437500034,-41.158007812500017],[173.957617187500034,-41.099902343750017],[174.024023437500034,-41.072265625],[173.99755859375,-41.028125],[173.999414062500023,-40.993261718750006],[174.121191406250034,-41.004687500000017],[174.211816406250023,-40.985449218750006],[174.223828125000011,-41.0244140625],[174.302539062500045,-41.01953125],[174.199511718750045,-41.16015625],[174.03857421875,-41.241894531250011],[174.138085937500023,-41.248242187500011],[174.283593750000023,-41.171582031250011],[174.3701171875,-41.103710937500011],[174.367578125000023,-41.188378906249994],[174.237109375000045,-41.312207031250011],[174.169531250000034,-41.327050781249994],[174.10205078125,-41.365917968750011],[174.0693359375,-41.429492187500017],[174.092382812500034,-41.505175781250017],[174.1611328125,-41.561816406250017],[174.083691406250011,-41.670800781249994],[174.169921875,-41.6572265625],[174.217089843750045,-41.677734375],[174.283105468750023,-41.740625],[174.215429687500034,-41.850195312500006],[173.973925781250045,-42.08056640625],[173.887988281250045,-42.130175781250017],[173.88916015625,-42.211621093750011],[173.83984375,-42.270898437499994],[173.545117187500011,-42.51796875],[173.347558593750023,-42.8408203125],[173.22119140625,-42.9765625],[173.072363281250034,-43.060253906250011],[172.888867187500011,-43.124218750000011],[172.718554687500045,-43.2587890625],[172.6240234375,-43.2724609375],[172.626953125,-43.299511718750011],[172.6875,-43.314648437500011],[172.734765625000023,-43.354785156250017],[172.69970703125,-43.399707031250017],[172.632226562500023,-43.427929687500011],[172.562207031250011,-43.43603515625],[172.526660156250045,-43.464746093749994],[172.693457031250034,-43.4443359375],[172.740429687500011,-43.467871093750006],[172.7666015625,-43.561914062499994],[172.807031250000023,-43.620996093749994],[173.0732421875,-43.676171875],[173.098046875000023,-43.703515625],[173.116894531250011,-43.7978515625],[173.093945312500011,-43.844140625],[173.065625,-43.874609375],[172.920605468750011,-43.891406250000017],[172.817675781250045,-43.8701171875],[172.749316406250045,-43.813085937500006],[172.502734375000045,-43.843652343749994],[172.475976562500023,-43.833398437499994],[172.583789062500045,-43.773535156250006],[172.480371093750023,-43.726660156250006],[172.395605468750034,-43.77783203125],[172.38525390625,-43.82958984375],[172.350390625000045,-43.859375],[172.296582031250011,-43.867871093750011],[172.035546875000023,-43.701757812500006],[172.179785156250034,-43.89599609375],[172.080761718750011,-43.945605468750017],[171.890625,-44.006933593750006],[171.658984375000045,-44.1171875],[171.517773437500011,-44.118359375000011],[171.442578125000011,-44.135839843750006],[171.41748046875,-44.208691406250011],[171.364550781250045,-44.254980468750006],[171.24072265625,-44.26416015625],[171.31298828125,-44.301855468750006],[171.231054687500034,-44.521191406250011],[171.197851562500034,-44.767871093750017],[171.146289062500045,-44.912304687500011],[170.9990234375,-44.911425781250017],[171.022851562500023,-44.93701171875],[171.134179687500023,-44.977734375000011],[171.11328125,-45.039257812500011],[170.939648437500011,-45.21640625],[170.889941406250045,-45.373925781249994],[170.815234375000045,-45.519140625],[170.700585937500023,-45.684277343750011],[170.69970703125,-45.713964843750006],[170.788476562500023,-45.79248046875],[170.791210937500011,-45.843847656250006],[170.776269531250023,-45.870898437500017],[170.419140625000011,-45.941015625],[170.33544921875,-45.991796875],[170.186132812500034,-46.160839843750011],[169.918261718750045,-46.334375],[169.686621093750034,-46.551660156249994],[169.34228515625,-46.620507812499994],[169.0986328125,-46.630664062500017],[168.766796875000011,-46.566308593749994],[168.572265625,-46.611035156250011],[168.466406250000034,-46.587890625],[168.382128906250045,-46.605371093749994],[168.32568359375,-46.545703125000017],[168.343066406250045,-46.489062500000017],[168.319726562500023,-46.447167968749994],[168.189160156250011,-46.362207031249994],[168.077343750000011,-46.352929687499994],[167.841992187500011,-46.3662109375],[167.682226562500034,-46.19296875],[167.539453125000023,-46.148535156250006],[167.490625,-46.1546875],[167.414257812500011,-46.22890625],[167.368945312500045,-46.241503906250017],[167.100292968750011,-46.249414062499994],[166.830761718750011,-46.225488281249994],[166.731542968750034,-46.197851562500006],[166.712109375000011,-46.133691406249994],[166.916699218750011,-45.957226562500011],[166.730273437500045,-46.052734375],[166.64990234375,-46.041699218750011],[166.726953125000023,-45.96328125],[166.733789062500023,-45.928320312500006],[166.717968750000011,-45.889355468750011],[166.612695312500023,-45.955371093750017],[166.4931640625,-45.9638671875],[166.477636718750034,-45.902734375],[166.48828125,-45.831835937500017],[166.512890625000011,-45.811718750000011],[166.836035156250034,-45.774511718750006],[166.952539062500023,-45.750195312500011],[167.003320312500023,-45.712109375000011],[166.809960937500023,-45.699023437500017],[166.797656250000045,-45.645605468750006],[166.825585937500023,-45.602832031250017],[166.990820312500034,-45.53173828125],[166.869042968750023,-45.549902343750006],[166.733984375000034,-45.543554687500006],[166.743066406250023,-45.468457031250011],[166.7783203125,-45.40966796875],[166.919921875,-45.407910156250011],[166.875585937500034,-45.367578125],[166.869238281250034,-45.311230468750011],[166.908593750000023,-45.307421875000017],[167.052148437500023,-45.383203125],[167.155664062500023,-45.410937500000017],[167.112109375000045,-45.35390625],[167.117773437500034,-45.31796875],[167.230078125000034,-45.290332031250017],[167.127343750000023,-45.265820312500011],[167.032812500000034,-45.222460937500017],[167.02587890625,-45.123632812500006],[167.1279296875,-45.05078125],[167.188183593750011,-45.094140625],[167.259472656250011,-45.082226562500011],[167.205078125,-45.048144531250017],[167.171875,-44.9970703125],[167.194531250000011,-44.963476562500006],[167.410742187500034,-44.827929687500017],[167.466210937500023,-44.958300781250017],[167.482128906250011,-44.873925781249994],[167.45625,-44.83828125],[167.4599609375,-44.80234375],[167.484960937500034,-44.771386718749994],[167.57763671875,-44.740820312500006],[167.698144531250023,-44.641308593750011],[167.787011718750023,-44.595019531250017],[167.859375,-44.624707031250011],[167.908984375000045,-44.664746093750011],[167.901562500000011,-44.625],[167.866406250000011,-44.592089843750017],[167.856542968750034,-44.500683593750011],[168.366601562500023,-44.08203125],[168.457421875000023,-44.030566406250017],[168.650976562500034,-43.97216796875],[168.806445312500045,-43.991992187500017],[169.066503906250034,-43.863476562500011],[169.178906250000011,-43.9130859375],[169.1357421875,-43.81982421875],[169.169531250000034,-43.777050781250011],[169.515234375000034,-43.623632812500006],[169.661523437500023,-43.591210937499994],[169.769238281250011,-43.538476562499994],[169.833886718750023,-43.537011718749994],[169.824023437500045,-43.497167968750006],[169.835058593750034,-43.458984375],[169.890820312500011,-43.461621093750011],[169.908007812500045,-43.446582031250017],[169.858984375000034,-43.425976562500011],[170.017578125,-43.349414062500017],[170.103710937500011,-43.265039062499994],[170.189648437500011,-43.222070312499994],[170.240234375,-43.163867187500017],[170.3,-43.144628906250006],[170.355761718750045,-43.153613281250017],[170.396093750000034,-43.182226562500006],[170.374316406250045,-43.134667968749994],[170.302832031250034,-43.107617187500011],[170.458691406250011,-43.037695312500006],[170.61181640625,-43.091796875],[170.535839843750011,-43.040722656250011],[170.523632812500011,-43.008984375000011],[170.665429687500023,-42.961230468750017],[170.735253906250023,-43.02978515625],[170.725292968750011,-42.975488281249994],[170.741601562500023,-42.92734375],[170.969921875000011,-42.718359375],[171.011425781250011,-42.763671875],[171.01171875,-42.885058593750017],[171.038378906250045,-42.862109375000017],[171.047558593750011,-42.801855468750006],[171.027734375000023,-42.696093750000017],[171.189550781250034,-42.50048828125],[171.257031250000011,-42.46533203125],[171.313378906250023,-42.460156250000011],[171.252246093750045,-42.401953125],[171.296484375000034,-42.302539062500017],[171.360253906250023,-42.079980468749994],[171.420605468750011,-41.973046875],[171.486230468750023,-41.794726562500017],[171.536328125000011,-41.757519531250011],[171.672167968750045,-41.744726562500006],[171.731640625000011,-41.719628906249994],[171.830664062500034,-41.655175781249994],[171.948046875000045,-41.538671875],[172.0107421875,-41.444726562499994],[172.093359375000034,-41.2015625],[172.139453125000045,-40.947265625],[172.272753906250045,-40.758691406249994],[172.640625,-40.518261718750011],[172.711132812500011,-40.496679687500006],[172.830175781250034,-40.490039062500017],[172.943652343750045,-40.51875],[172.732617187500011,-40.54375],[172.704394531250045,-40.667773437500017],[172.766796875000011,-40.7734375],[172.869140625,-40.8203125],[172.988671875000023,-40.848242187500006],[173.042285156250045,-40.95361328125],[173.068652343750045,-41.185839843750017],[173.115332031250034,-41.279296875]]]}}, +{"type":"Feature","properties":{"scalerank":0,"featurecla":"Land","min_zoom":3.0},"geometry":{"type":"Polygon","coordinates":[[[175.512597656250023,-36.176953125000011],[175.551171875000023,-36.333886718750009],[175.474609375,-36.314453125],[175.444628906250045,-36.273242187500003],[175.34619140625,-36.2177734375],[175.336621093750011,-36.134765625],[175.389550781250023,-36.077734375],[175.409375,-36.070898437500006],[175.512597656250023,-36.176953125000011]]]}}, +{"type":"Feature","properties":{"scalerank":0,"featurecla":"Land","min_zoom":3.0},"geometry":{"type":"Polygon","coordinates":[[[173.914648437500034,-40.863671875],[173.780859375000034,-40.921777343749994],[173.812402343750023,-40.793652343750011],[173.873339843750045,-40.749316406250017],[173.964453125000034,-40.712988281250006],[173.9580078125,-40.786816406250011],[173.914648437500034,-40.863671875]]]}}, +{"type":"Feature","properties":{"scalerank":0,"featurecla":"Land","min_zoom":3.0},"geometry":{"type":"Polygon","coordinates":[[[166.746289062500011,-45.655859375],[166.729199218750011,-45.729687500000011],[166.532031250000045,-45.699804687500006],[166.567089843750011,-45.644433593749994],[166.685644531250034,-45.615039062500017],[166.746289062500011,-45.655859375]]]}}, +{"type":"Feature","properties":{"scalerank":0,"featurecla":"Land","min_zoom":2.0},"geometry":{"type":"Polygon","coordinates":[[[168.144921875000023,-46.862207031249994],[168.145312500000045,-46.902148437500017],[168.041015625,-46.887792968750006],[168.043164062500011,-46.9326171875],[168.12548828125,-46.956152343750006],[168.155957031250011,-46.98828125],[168.241406250000011,-46.97900390625],[168.260644531250023,-47.027050781250011],[168.240917968750011,-47.070019531250011],[168.183886718750045,-47.1015625],[168.015039062500023,-47.117480468750017],[167.905566406250045,-47.179882812500011],[167.784960937500045,-47.176074218750017],[167.676367187500034,-47.242968750000017],[167.52197265625,-47.258691406249994],[167.538769531250011,-47.199023437500017],[167.629003906250034,-47.142285156250011],[167.630957031250034,-47.087792968749994],[167.654101562500045,-47.044238281250017],[167.740917968750011,-47.013574218749994],[167.741992187500045,-46.956835937500017],[167.80078125,-46.906542968750017],[167.765234375000034,-46.797656250000017],[167.783984375000045,-46.699804687500006],[167.955761718750011,-46.694433593750006],[168.144921875000023,-46.862207031249994]]]}}, +{"type":"Feature","properties":{"scalerank":0,"featurecla":"Land","min_zoom":4.0},"geometry":{"type":"Polygon","coordinates":[[[166.9794921875,-45.1796875],[167.022656250000011,-45.2998046875],[166.93115234375,-45.27685546875],[166.892675781250034,-45.240527343750017],[166.9794921875,-45.1796875]]]}} +] +} diff --git a/en/output/kriging-example/nz_scenarios.map b/en/output/kriging-example/nz_scenarios.map new file mode 100644 index 00000000000..96a66dfcfd5 --- /dev/null +++ b/en/output/kriging-example/nz_scenarios.map @@ -0,0 +1,408 @@ +MAP + NAME "nz_kriging_scenarios" + SIZE 340 440 + EXTENT 990000 4730000 2120000 6190000 + UNITS meters + IMAGETYPE "png" + IMAGECOLOR 222 234 244 + CONFIG "MS_ERRORFILE" "stderr" + PROJECTION + "init=epsg:2193" + END + + #=== scenario 1: dense, even network =================================# + LAYER + NAME "idw_regular" + TYPE raster + STATUS off + CONNECTIONTYPE idw + CONNECTION "grid_regular" + MASK "landmask" + PROCESSING "RANGE_COLORSPACE=RGB" + PROCESSING "IDW_RADIUS=250" + PROCESSING "IDW_POWER=2" + PROCESSING "IDW_COMPUTE_BORDERS=OFF" + OFFSITE 0 0 0 + CLASS + STYLE # < 250 mm + COLORRANGE "#8b0000" "#8b0000" + DATARANGE 0 8.33 + END + STYLE # 250 - 500 + COLORRANGE "#e41a1c" "#e41a1c" + DATARANGE 8.33 16.67 + END + STYLE # 500 - 750 + COLORRANGE "#ff7f00" "#ff7f00" + DATARANGE 16.67 25 + END + STYLE # 750 - 1000 + COLORRANGE "#ffe93a" "#ffe93a" + DATARANGE 25 33.33 + END + STYLE # 1000 - 1250 + COLORRANGE "#a6d96a" "#a6d96a" + DATARANGE 33.33 41.67 + END + STYLE # 1250 - 1500 + COLORRANGE "#41ab5d" "#41ab5d" + DATARANGE 41.67 50 + END + STYLE # 1500 - 2000 + COLORRANGE "#1d9182" "#1d9182" + DATARANGE 50 66.67 + END + STYLE # 2000 - 3000 + COLORRANGE "#6baed6" "#6baed6" + DATARANGE 66.67 100 + END + STYLE # 3000 - 4000 + COLORRANGE "#2166ac" "#2166ac" + DATARANGE 100 133.33 + END + STYLE # > 4000 mm + COLORRANGE "#6a3d9a" "#6a3d9a" + DATARANGE 133.33 260 + END + END + END + LAYER + NAME "km_regular" + TYPE raster + STATUS off + CONNECTIONTYPE kriging + CONNECTION "grid_regular" + MASK "landmask" + PROCESSING "RANGE_COLORSPACE=RGB" + PROCESSING "KRIGING_MODEL=EXPONENTIAL" + PROCESSING "KRIGING_TYPE=ORDINARY" + PROCESSING "KRIGING_NEIGHBORS=16" + PROCESSING "KRIGING_RANGE=40" + PROCESSING "KRIGING_SILL=2000" + PROCESSING "KRIGING_NUGGET=0" + PROCESSING "BANDS=1" + OFFSITE 0 0 0 + CLASS + STYLE # < 250 mm + COLORRANGE "#8b0000" "#8b0000" + DATARANGE 0 8.33 + END + STYLE # 250 - 500 + COLORRANGE "#e41a1c" "#e41a1c" + DATARANGE 8.33 16.67 + END + STYLE # 500 - 750 + COLORRANGE "#ff7f00" "#ff7f00" + DATARANGE 16.67 25 + END + STYLE # 750 - 1000 + COLORRANGE "#ffe93a" "#ffe93a" + DATARANGE 25 33.33 + END + STYLE # 1000 - 1250 + COLORRANGE "#a6d96a" "#a6d96a" + DATARANGE 33.33 41.67 + END + STYLE # 1250 - 1500 + COLORRANGE "#41ab5d" "#41ab5d" + DATARANGE 41.67 50 + END + STYLE # 1500 - 2000 + COLORRANGE "#1d9182" "#1d9182" + DATARANGE 50 66.67 + END + STYLE # 2000 - 3000 + COLORRANGE "#6baed6" "#6baed6" + DATARANGE 66.67 100 + END + STYLE # 3000 - 4000 + COLORRANGE "#2166ac" "#2166ac" + DATARANGE 100 133.33 + END + STYLE # > 4000 mm + COLORRANGE "#6a3d9a" "#6a3d9a" + DATARANGE 133.33 260 + END + END + END + LAYER + NAME "sd_regular" + TYPE raster + STATUS off + CONNECTIONTYPE kriging + CONNECTION "grid_regular" + MASK "landmask" + PROCESSING "RANGE_COLORSPACE=RGB" + PROCESSING "KRIGING_MODEL=EXPONENTIAL" + PROCESSING "KRIGING_TYPE=ORDINARY" + PROCESSING "KRIGING_NEIGHBORS=16" + PROCESSING "KRIGING_RANGE=40" + PROCESSING "KRIGING_SILL=2000" + PROCESSING "KRIGING_NUGGET=0" + PROCESSING "BANDS=2" + OFFSITE 0 0 0 + CLASS + STYLE + COLORRANGE "#440154" "#3b528b" + DATARANGE 0 11.25 + END + STYLE + COLORRANGE "#3b528b" "#21908c" + DATARANGE 11.25 22.5 + END + STYLE + COLORRANGE "#21908c" "#5dc863" + DATARANGE 22.5 33.75 + END + STYLE + COLORRANGE "#5dc863" "#fde725" + DATARANGE 33.75 45 + END + END + END + + #=== scenario 2: clustered network (gaps over the back-country) ======# + LAYER + NAME "idw_clustered" + TYPE raster + STATUS off + CONNECTIONTYPE idw + CONNECTION "grid_clustered" + MASK "landmask" + PROCESSING "RANGE_COLORSPACE=RGB" + PROCESSING "IDW_RADIUS=250" + PROCESSING "IDW_POWER=2" + PROCESSING "IDW_COMPUTE_BORDERS=OFF" + OFFSITE 0 0 0 + CLASS + STYLE # < 250 mm + COLORRANGE "#8b0000" "#8b0000" + DATARANGE 0 8.33 + END + STYLE # 250 - 500 + COLORRANGE "#e41a1c" "#e41a1c" + DATARANGE 8.33 16.67 + END + STYLE # 500 - 750 + COLORRANGE "#ff7f00" "#ff7f00" + DATARANGE 16.67 25 + END + STYLE # 750 - 1000 + COLORRANGE "#ffe93a" "#ffe93a" + DATARANGE 25 33.33 + END + STYLE # 1000 - 1250 + COLORRANGE "#a6d96a" "#a6d96a" + DATARANGE 33.33 41.67 + END + STYLE # 1250 - 1500 + COLORRANGE "#41ab5d" "#41ab5d" + DATARANGE 41.67 50 + END + STYLE # 1500 - 2000 + COLORRANGE "#1d9182" "#1d9182" + DATARANGE 50 66.67 + END + STYLE # 2000 - 3000 + COLORRANGE "#6baed6" "#6baed6" + DATARANGE 66.67 100 + END + STYLE # 3000 - 4000 + COLORRANGE "#2166ac" "#2166ac" + DATARANGE 100 133.33 + END + STYLE # > 4000 mm + COLORRANGE "#6a3d9a" "#6a3d9a" + DATARANGE 133.33 260 + END + END + END + LAYER + NAME "km_clustered" + TYPE raster + STATUS off + CONNECTIONTYPE kriging + CONNECTION "grid_clustered" + MASK "landmask" + PROCESSING "RANGE_COLORSPACE=RGB" + PROCESSING "KRIGING_MODEL=EXPONENTIAL" + PROCESSING "KRIGING_TYPE=ORDINARY" + PROCESSING "KRIGING_NEIGHBORS=16" + PROCESSING "KRIGING_RANGE=40" + PROCESSING "KRIGING_SILL=2000" + PROCESSING "KRIGING_NUGGET=0" + PROCESSING "BANDS=1" + OFFSITE 0 0 0 + CLASS + STYLE # < 250 mm + COLORRANGE "#8b0000" "#8b0000" + DATARANGE 0 8.33 + END + STYLE # 250 - 500 + COLORRANGE "#e41a1c" "#e41a1c" + DATARANGE 8.33 16.67 + END + STYLE # 500 - 750 + COLORRANGE "#ff7f00" "#ff7f00" + DATARANGE 16.67 25 + END + STYLE # 750 - 1000 + COLORRANGE "#ffe93a" "#ffe93a" + DATARANGE 25 33.33 + END + STYLE # 1000 - 1250 + COLORRANGE "#a6d96a" "#a6d96a" + DATARANGE 33.33 41.67 + END + STYLE # 1250 - 1500 + COLORRANGE "#41ab5d" "#41ab5d" + DATARANGE 41.67 50 + END + STYLE # 1500 - 2000 + COLORRANGE "#1d9182" "#1d9182" + DATARANGE 50 66.67 + END + STYLE # 2000 - 3000 + COLORRANGE "#6baed6" "#6baed6" + DATARANGE 66.67 100 + END + STYLE # 3000 - 4000 + COLORRANGE "#2166ac" "#2166ac" + DATARANGE 100 133.33 + END + STYLE # > 4000 mm + COLORRANGE "#6a3d9a" "#6a3d9a" + DATARANGE 133.33 260 + END + END + END + LAYER + NAME "sd_clustered" + TYPE raster + STATUS off + CONNECTIONTYPE kriging + CONNECTION "grid_clustered" + MASK "landmask" + PROCESSING "RANGE_COLORSPACE=RGB" + PROCESSING "KRIGING_MODEL=EXPONENTIAL" + PROCESSING "KRIGING_TYPE=ORDINARY" + PROCESSING "KRIGING_NEIGHBORS=16" + PROCESSING "KRIGING_RANGE=40" + PROCESSING "KRIGING_SILL=2000" + PROCESSING "KRIGING_NUGGET=0" + PROCESSING "BANDS=2" + OFFSITE 0 0 0 + CLASS + STYLE + COLORRANGE "#440154" "#3b528b" + DATARANGE 0 11.25 + END + STYLE + COLORRANGE "#3b528b" "#21908c" + DATARANGE 11.25 22.5 + END + STYLE + COLORRANGE "#21908c" "#5dc863" + DATARANGE 22.5 33.75 + END + STYLE + COLORRANGE "#5dc863" "#fde725" + DATARANGE 33.75 45 + END + END + END + + #=== sample sources, basemap, labelled cities ========================# + LAYER + NAME "grid_regular" + TYPE point + STATUS off + CONNECTIONTYPE OGR + CONNECTION "grid_nz_regular.csv" + DATA "grid_nz_regular" + PROJECTION + "init=epsg:4326" + END + CLASS + STYLE + SIZE [weight] + END + END + END + LAYER + NAME "grid_clustered" + TYPE point + STATUS off + CONNECTIONTYPE OGR + CONNECTION "grid_nz_clustered.csv" + DATA "grid_nz_clustered" + PROJECTION + "init=epsg:4326" + END + CLASS + STYLE + SIZE [weight] + END + END + END + LAYER + NAME "landmask" + TYPE polygon + STATUS off + CONNECTIONTYPE OGR + CONNECTION "nz_coast.geojson" + DATA "nz_coast" + PROJECTION + "init=epsg:4326" + END + CLASS + STYLE + COLOR 0 0 0 + END + END + END + LAYER + NAME "coastline" + TYPE line + STATUS on + CONNECTIONTYPE OGR + CONNECTION "nz_coast.geojson" + DATA "nz_coast" + PROJECTION + "init=epsg:4326" + END + CLASS + STYLE + COLOR 90 110 130 + WIDTH 0.6 + END + END + END + LAYER + NAME "cities" + TYPE point + STATUS on + CONNECTIONTYPE OGR + CONNECTION "cities_major.csv" + DATA "cities_major" + PROJECTION + "init=epsg:4326" + END + CLASS + STYLE + SYMBOL "circle" + SIZE 5 + COLOR 20 20 20 + OUTLINECOLOR 255 255 255 + WIDTH 1 + END + END + END + + SYMBOL + NAME "circle" + TYPE ellipse + FILLED true + POINTS 1 1 END + END +END diff --git a/en/output/kriging.txt b/en/output/kriging.txt new file mode 100644 index 00000000000..64c32a7c7fc --- /dev/null +++ b/en/output/kriging.txt @@ -0,0 +1,242 @@ +.. _kriging: + +***************************************************************************** + Kriging interpolation +***************************************************************************** + +.. contents:: Table of Contents + :depth: 2 + :backlinks: top + +Introduction +============ + +.. versionadded:: 8.8 + +Kriging turns scattered vector features into a continuous raster surface, like +:ref:`idw`, but it is a *geostatistical* interpolator: it fits a model of the +data's spatial correlation and returns, together with the interpolated value, +an estimate of how uncertain that value is. + +It is implemented as a localized **Nearest-Neighbor Gaussian Process (NNGP)**: +each output pixel is predicted by ordinary (or simple) kriging using only its +``m`` nearest input samples, so cost scales with the neighbour count rather +than with a dense solve over the whole dataset. + +It produces **two raster bands**, selected with ``PROCESSING "BANDS=n"``: + +- band **1**: the predictive **mean**, the interpolated surface; +- band **2**: the predictive **standard deviation** (the kriging standard + error), close to zero at the sample locations and rising across the gaps + between them. + +Configuration +============= + +Set the `LAYER` `CONNECTIONTYPE` parameter to `KRIGING`. As with :ref:`idw`, +the samples come from another vector `LAYER` referenced by `CONNECTION`, and +each sample's value is read from that layer's ``STYLE SIZE [attribute]`` +binding (see the corresponding section of :ref:`kerneldensity`). + +The interpolation takes the following parameters: + +- **CONNECTION "layername"** : reference to the `NAME` or `GROUP` of a `LAYER` + to use as an input vector datasource. The referenced layer should be a + `TYPE` `POINT` layer. + +- **PROCESSING "KRIGING_MODEL=EXPONENTIAL"** : the covariance model, one of + ``EXPONENTIAL`` (Matern nu=1/2, the default), ``GAUSSIAN`` or ``SPHERICAL``. + +- **PROCESSING "KRIGING_TYPE=ORDINARY"** : ``ORDINARY`` (the default) assumes an + unknown, locally constant mean; ``SIMPLE`` assumes a known (zero or + pre-detrended) mean. + +- **PROCESSING "KRIGING_NEIGHBORS=16"** : the number of nearest samples ``m`` + used to predict each pixel. Larger values approach a full kriging solve at + higher cost (roughly ``O(m^3)`` per pixel). The default is 16. + +- **PROCESSING "KRIGING_RANGE=numeric"** : the practical range of the + covariance model, in pixels: the lag beyond which samples are effectively + uncorrelated. The default auto-fits to about a third of the image diagonal. + +- **PROCESSING "KRIGING_SILL=numeric"** : the partial sill, the variance the + covariance model reaches at large lags. The default auto-fits from the + sample variance. + +- **PROCESSING "KRIGING_NUGGET=numeric"** : the nugget. ``0`` (the default) + makes the surface interpolate the samples exactly; a positive value smooths + through them and stabilises the solve where samples are dense or coincident. + +- **PROCESSING "BANDS=1|2"** : which output band to render: ``1`` for the mean + (the default), ``2`` for the standard deviation. + +Worked example: two sampling networks +====================================== + +The example interpolates annual rainfall over New Zealand from the same field +two ways, to show both what kriging adds over IDW and how the uncertainty band +responds to the sampling layout. Each scenario is rendered as three panels: +IDW, the kriging mean (band 1) and the kriging standard deviation (band 2). + +Example files +------------- + +Download the files into one directory and render the example as is; no +preprocessing step and no external data are required. + +- :download:`nz_scenarios.map `: the complete + mapfile (the IDW, kriging-mean and kriging-SD layers for both scenarios, plus + the point sources, land mask, coastline and city points). +- :download:`grid_nz_regular.csv `: the + dense, evenly spaced network (238 samples). +- :download:`grid_nz_clustered.csv `: + samples kept only near six cities (63 samples), leaving the West Coast, + Fiordland and inland Southland unsampled. +- :download:`cities_major.csv `: six cities, + drawn as points for orientation. +- :download:`nz_coast.geojson `: a simplified + coastline, used for both the land mask and the outline. + +Each sample's value is the annual rainfall scaled to the 0-255 byte range +(rainfall in mm divided by 30); the kriging layer reads it through +``STYLE SIZE [weight]``. + +Mapfile +------- + +The complete mapfile is the download above. Its essential elements are the +point layer that holds the samples and the two kriging layers that read it. +``KRIGING_RANGE`` and ``KRIGING_SILL`` are pinned so the two scenarios share one +covariance model and their SD bands stay comparable: + +.. code-block:: mapfile + + # the sample layer; each point's value is taken from SIZE [weight] + LAYER + NAME "grid_regular" + TYPE point + CONNECTIONTYPE OGR + CONNECTION "grid_nz_regular.csv" + CLASS + STYLE + SIZE [weight] + END + END + END + + # band 1: the interpolated mean, drawn with the rainfall isohyet palette + LAYER + NAME "km_regular" + TYPE raster + CONNECTIONTYPE kriging + CONNECTION "grid_regular" + MASK "landmask" + PROCESSING "KRIGING_MODEL=EXPONENTIAL" + PROCESSING "KRIGING_TYPE=ORDINARY" + PROCESSING "KRIGING_NEIGHBORS=16" + PROCESSING "KRIGING_RANGE=40" + PROCESSING "KRIGING_SILL=2000" + PROCESSING "BANDS=1" + # CLASS with the rainfall isohyet ramp (see the full mapfile) + END + + # band 2: the standard deviation, drawn with a viridis ramp + LAYER + NAME "sd_regular" + TYPE raster + CONNECTIONTYPE kriging + CONNECTION "grid_regular" + MASK "landmask" + PROCESSING "KRIGING_RANGE=40" + PROCESSING "KRIGING_SILL=2000" + PROCESSING "BANDS=2" + CLASS + STYLE + COLORRANGE "#440154" "#fde725" + DATARANGE 0 45 + END + END + END + +The clustered scenario uses the same layers reading ``grid_nz_clustered.csv``. + +Rendering +--------- + +Render the six panels (each is a surface plus the coastline and city points), +then combine them into the two triptychs with ImageMagick: + +.. code-block:: bash + + # six panels: IDW, kriging mean and kriging SD, for each scenario + for s in idw_regular km_regular sd_regular \ + idw_clustered km_clustered sd_clustered; do + map2img -m nz_scenarios.map -l "$s coastline cities" -o "$s.png" -i png + done + + # one triptych per scenario + montage -label 'IDW' idw_regular.png \ + -label 'Kriging mean' km_regular.png \ + -label 'Kriging std dev' sd_regular.png \ + -tile 3x1 -geometry +8+8 idw_vs_kriging.png + montage -label 'IDW' idw_clustered.png \ + -label 'Kriging mean' km_clustered.png \ + -label 'Kriging std dev' sd_clustered.png \ + -tile 3x1 -geometry +8+8 idw_vs_kriging_clustered.png + +Scenario 1: a dense, even network +--------------------------------- + +.. figure:: ../images/kriging-dense.png + :width: 100% + + IDW, kriging mean and kriging standard deviation from 238 evenly spaced + samples. + +With samples everywhere, IDW and the kriging mean agree closely (kriging is a +little smoother), and both resolve the dominant west-east pattern: the Southern +Alps wring out the prevailing westerlies, so the West Coast is very wet (the +purple spine) while Canterbury sits in the rain shadow. The standard-deviation +band is low and uniform across the country (every pixel is close to a +measurement), so the surface is well supported everywhere. + +Scenario 2: a clustered network +------------------------------- + +.. figure:: ../images/kriging-clustered.png + :width: 100% + + The same three panels from 63 samples clustered near the cities (the dots). + +Now the network covers only the populated areas. IDW and the kriging mean still +look plausible, but both have lost the West Coast high: with no samples there, +the South Island reads uniformly dry, and the mean alone gives no hint that +anything is wrong. The standard-deviation band does: it stays dark over the +city clusters (the dots) and turns bright over the unsampled West Coast, +Fiordland and Southland. This is the practical value of kriging over IDW: it +reports not only an estimate but also where that estimate is unsupported by +data. + +Technical notes +--------------- + +- IDW's per-sample bullseyes stand out against the kriging mean's smoother + bands because both are drawn with the same isohyet palette. +- ``KRIGING_RANGE`` is pinned smaller than the gaps in the clustered network, + which is why the clustered SD rises over those gaps. Left unset it auto-fits + to about a third of the image diagonal. +- ``KRIGING_SILL`` is pinned to the sample variance so the SD scale is the same + in both scenarios and the two SD panels stay comparable. +- Output bands are 8-bit (0 to 255). The mean is the value within the layer's + ``DATARANGE``; the standard deviation is in the same units, so the SD layer's + ``DATARANGE`` is the expected range of the standard error. + +References +========== + +- Datta, A., Banerjee, S., Finley, A. O., Gelfand, A. E. (2016). Hierarchical + Nearest-Neighbor Gaussian Process Models for Large Geostatistical Datasets. + *Journal of the American Statistical Association* 111(514), 800 to 812. +- Vecchia, A. V. (1988). Estimation and Model Identification for Continuous + Spatial Processes. *Journal of the Royal Statistical Society: Series B* + 50(2), 297 to 312.