logo separator

[mkgmap-dev] arcs and links (terminology)

From Alexander Atanasov aatanasov at gmail.com on Mon Feb 23 14:48:32 GMT 2009

Hi,

On Mon, Feb 23, 2009 at 3:43 PM, Robert Vollmert
<rvollmert-lists at gmx.net> wrote:
> Hello,
>
> I'm half-way through rewriting nod.txt to use the terminology in mkgmap's
> routing code, and I'm looking for input regarding the naming of arcs and
> links.
>
> In the current version of nod.txt, I called any of the pointers between
> nodes "links", and called the "arcs" we're writing now "direct links", while
> the "links" we're not writing yet are called "indirect links". On the other
> hand, libgarmin uses arcs and links, and mkgmap's source code has just arcs
> for the moment. Consistency would be nice.
>
> Does anyone have a suggestion for a new term encompassing both arcs and
> links? I'm finding myself writing a lot of "arc/link", and distinguishing
> them as "direct something" vs. "indirect something" would make the text a
> lot clearer. What do you think of using the word "edge" (as in an edge of
> the routing graph)?
>
> arc = direct edge
> link = indirect edge
>
> If we ever want to write links, it would probably make sense to base
> RouteLink and RouteArc in a common superclass, which would also benefit from
> an umbrella term.


My understanding goes like this.
Looking at the whole thing as connected trees.
Tree with roads class 0, another with class 1 and so on.
Where the node which  connects two different road classes is a member
of the higher class
BUT it's root of the lower class, so nodes in the lower class have a
link to it's root node.


 ----------------N1.1--------------
                        |
   N0.1(L1.1)-N0.2(L1.1)------------N0.3(L1.1)
   |                                                    |
======================
   |                                                    |
   N0.4(L1.2)----N0.5(L1.2)-----------N0.6(L1.2)
                                                         |
 ------------N1.3------------------------N1.2

Trees:
T1 - N1.1, ..... other nodes in class 1 tree  - class 1
T2 - N1.2, N1.3
T3 - N0.1, N0.2, N0.3 -> class 0
T4 - N0.4, N0.5, N0.6 -> class 0

Where N0.4<->N0.1 and N0.6<->N0.3 connect T3 and T4, but they have
different root nodes, the closer one.
But the root nodes for T3 and T4 are N1.1 and N1.2 . they have links
to the root node of the tree they belong to.
So Arcs link nodes, Links link trees, a better naming is welcome for
the pointer to the tree's root node.

-- 
have fun,
alex



More information about the mkgmap-dev mailing list