Hi all,
Really basic question. Playing with the develop branch. With pgr_costresult, what are the pieces of that composite type, and where's the best reference for this? I guessed rightly that cost was one of them, e.g.:
SELECT (pgr_astar('SELECT gid AS id, source, target, length AS cost, x1, x2, y1, y2 FROM ways', 25352, 21285, false, false)).cost;
I know how to look up types in psql, i.e. '\dT', or better yet '\dt+', but there's no description of what the names of the sub-types are in the tuple.
Thanks in advance,
Best,
Steve
On 6/14/2013 4:53 PM, Stephen Mather wrote:
Hi all,
Really basic question. Playing with the develop branch. With
pgr_costresult, what are the pieces of that composite type, and where's
the best reference for this? I guessed rightly that cost was one of
them, e.g.:
SELECT (pgr_astar('SELECT gid AS id, source, target, length AS cost, x1,
x2, y1, y2 FROM ways', 25352, 21285, false, false)).cost;
I know how to look up types in psql, i.e. '\dT', or better yet '\dt+',
but there's no description of what the names of the sub-types are in the
tuple.
http://docs.pgrouting.org/dev/doc/index.html
It is a generic tuple, and each function decides what to put in the slots, but the basic usage is something like:
seq - allows you to maintain order of results after joins
id1 - often node id
id2 - often edge id
cost - cost to traverse edge or get to node
But it can vary based on the specific command.
-Steve
Ah yes. I see I was doing a really lazy man's job of reading the docs... . Apologies for that.
Thanks Steve,
Best,
Steve
http://docs.pgrouting.org/dev/doc/index.html
It is a generic tuple, and each function decides what to put in the slots, but the basic usage is something like:
seq - allows you to maintain order of results after joins
id1 - often node id
id2 - often edge id
cost - cost to traverse edge or get to node
But it can vary based on the specific command.
-Steve
_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev