Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
geo3d 1.0.0 documentation
geo3d 1.0.0 documentation
  • Installation
  • Usage
  • README
  • API Reference
    • geo3d
      • geo3d.core
        • geo3d.core.base
        • geo3d.core.functional
        • geo3d.core.links
        • geo3d.core.pipeline
      • geo3d.pdal
        • geo3d.pdal.filters
        • geo3d.pdal.helpers
        • geo3d.pdal.readers
        • geo3d.pdal.writers
      • geo3d.settings
      • geo3d.utils
        • geo3d.utils.colors
        • geo3d.utils.geometry
        • geo3d.utils.multiprocessing
      • geo3d.visualization
        • geo3d.visualization.visualizer
Back to top
View this page

geo3d.core.links¶

Functions¶

link(→ Dict[str, List[str]])

Link element A to its following element B. A and B can be both lists or just single elements.

interlink(→ Dict[str, List[str]])

Link together the elements of sequence of elements.

structure_parse(→ Dict[str, List[str]])

Parse the pipeline in a linking dictionary. Examples of pipelines can be found in the link function.

Module Contents¶

geo3d.core.links.link(A: List[Any] | str, B: List[Any] | str) → Dict[str, List[str]]¶

Link element A to its following element B. A and B can be both lists or just single elements.

A schema of a pipeline is defined as a list containing the elements to be linked and the way they are linked. Level 1 nested lists represent parallel elements while level 2 nested lists represent sequence elements. Having elements followed by each other, They must be linked, meaning that the input of the following element has to list the outputs behind it. 4 cases can be drawn:

  1. Case 1 (line)

pipeline: A – B link(“A”, “B”) = {“B”: [“A”]}

  1. Case 2 (diverge)

    B

    /

pipeline: A -

C

link(“A”, [“B”, “C”]) = {“B”: [“A”], “C”: [“A”]}

  1. Case 3 (converge)

    A

pipeline: - C

/

B

link([“A”, “B”], “C”]) = {“C”: [“A”, “B”]}

  1. Case 4 (both directions)
    A C

    /

pipeline: -

/

B D

link([“A”, “B”], [“C”, “D”]) = {“C”: [“A”, “B”],”D”: [“A”, “B”]}

Also, in the case of elements arranged in sequence, link must link only the output of the sequence to the following element and only the input of the sequence to the previous element. For example, if we consider the following schema: schema = [[A, [B, C]], D] the pipeline is as follows:

A

pipeline: - D

/

B - c

link(schema) = {“D”: [“A”, “C”]}

In the same way, the opposite direction gets handled as follows: schema = [[[A, B], C], D]

B - C

/

pipeline: A -

D

link(schema) ={[“D”: [“A”], “B”: [“A”]}

The remaining links in a sequence element will be treated in the interlink function.

Returns:

A dictionary of links.

Return type:

dict

geo3d.core.links.interlink(A: List[str]) → Dict[str, List[str]]¶

Link together the elements of sequence of elements.

Returns:

A dictionary of links.

Return type:

dict

geo3d.core.links.structure_parse(pipeline: List[List[str] | str]) → Dict[str, List[str]]¶

Parse the pipeline in a linking dictionary. Examples of pipelines can be found in the link function.

Next
geo3d.core.pipeline
Previous
geo3d.core.functional
Copyright © 2025, altametris
Made with Sphinx and @pradyunsg's Furo
On this page
  • geo3d.core.links
    • Functions
    • Module Contents
      • link()
      • interlink()
      • structure_parse()