pgRouting / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
https://pgrouting.org
GNU General Public License v2.0
1.14k stars 364 forks source link

Get path as a geometry #2508

Open latot opened 1 year ago

latot commented 1 year ago

Hi all!

Problem With pgrouting, we can get the costs and paths of practically every node, this is great, but there is no easy way to transform the path, to the traveled geometry, at least in the Cost Matrix.

Improvement I think would be great, if the functions has a new param, where we set it to true they will return a new geometry column with the traveled path.

Actually, I think can be applied in some ways, like this:

In the MatrixCost, add a new column with the full traveled path in a geometry. While in the one2one nodes, is possible add a new geom column where is has the traveled path of the seq. Due to this, we would have n-1 linestrings, and one empty (similar to what happens with agg_cost).

Thx!

latot commented 1 year ago

Oks, I tested a little this, can be... very good and very bad, specially because for many2many cases, the geoms can use a lot of space on disk, really.. eats all my free disk space.