| 729 | |
| 730 | |
| 731 | == Combining postgis and R to calculate topology == |
| 732 | [=#COMBINE] |
| 733 | |
| 734 | After several issues calculating topology in PostGis (problem with the MB in max_stack_depth and the high calculation time when basins are big), some methods created in R for the CCM layers are used. |
| 735 | |
| 736 | At first, some parameters are created in sql: |
| 737 | -- nextdownid: estimate the downstream gid located next to each segment |
| 738 | -- dmer: adding zero for the downstream points (the method will calculate later the distance to the sea) |