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
| Parameter | Description |
|---|---|
barriers | The 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)"}该文章对您有帮助吗?