ST_CostUnion

更新时间:
复制 MD 格式

Merges multiple cost arrays of grids into a single unified array. For overlapping grids, only the highest cost value is retained. Cost arrays of degenerate grids are also merged.

Syntax

gridcost[] ST_CostUnion(gridcost[] barriers);

Parameters

ParameterDescription
barriersThe cost array of grids.

Examples

SELECT st_costunion(ARRAY[st_setcost(ARRAY[st_gridfromtext('GZ01')],1), st_setcost(ARRAY[st_gridfromtext('GZ0')],5)]);

Output:

{"({0102400100000000},5)"}