Interpolating elevation along a road using kriging
Last updated
Was this helpful?
Was this helpful?
SELECT
ST_GEOGPOINT(142.41*p+142.44*(1-p),43.496*p+43.53*(1-p)) point
FROM
# generate 101 points evenly spaced along the route
UNNEST(GENERATE_ARRAY(0,1,0.01)) p;CALL `carto-un`.carto.ORDINARY_KRIGING_TABLE(
'cartobq.docs.nasadem_jp_extract',
'cartobq.docs.kriging_jp_interp_points',
'cartobq.docs.kriging_jp_result',
50,
1000,
20,
'exponential'
);CALL `carto-un-eu`.carto.ORDINARY_KRIGING_TABLE(
'cartobq.docs.nasadem_jp_extract',
'cartobq.docs.kriging_jp_interp_points',
'cartobq.docs.kriging_jp_result',
50,
1000,
20,
'exponential'
);CALL carto.ORDINARY_KRIGING_TABLE(
'cartobq.docs.nasadem_jp_extract',
'cartobq.docs.kriging_jp_interp_points',
'cartobq.docs.kriging_jp_result',
50,
1000,
20,
'exponential'
);