views:

106

answers:

2

Ok, I have a flowchart definition (basically, array of nodes and edges for each node). Now I want to calculate coordinates for every task in the flow, preferably hierarchycal style.

I need something like Graph::Easy::Layout but I have no idea how to get nodes coordinates: I render nodes myself and I only want to retrieve box coordinates/size. Any suggestions?

What I need is a CPAN module available even in Debian repository.

+1  A: 

You can convert a tarball from CPAN into a Debian package. See What’s the best way to turn CPAN modules into Debian packages?

There you will find lots of good advice and links. There's even some discussion there as to why it might be a bad idea to install modules in this way.


Update

For layout with information on coordinates, Graph::Layout::Aesthetic is probably your best bet.

Most of the other packages on CPAN produce graphs in some description language (such as Graphviz DOT, GraphML or GDL) and rely on other graph layout libraries to handle actual layout tasks. Specific examples would be Graphviz and aisee.

Asking for the coordinates of a node (vertex) from one of these libraries is analogous to asking for the coordinates of a <P> tag from HTML::TreeBuilder.

There is a package called Graph::Renderer on CPAN but it looks very incomplete, so I hesitate to recommend it. But it may be usable for your needs.

Graph::Easy::As_svg actually lays out graphs and so may be modifiable to meet your needs.

daotoad
Thanks `daotoad` for good advice, but concerns related to packaging are secondary point of my question
jonny
A: 

In the end I did my layout client-side: found an anser in this question and used drakula's port of Graph::Layout::Spring module

jonny