Node

class geodetic_engine.persistablereference.esriwkt.Node[source]

Bases: object

One bracketed element of an ESRI WKT definition.

keyword

The element’s keyword, for example "GEOGTRAN".

children

Its comma-separated contents, in the order they were written. Strings, numbers and nested nodes all appear here.

property name: str

The element’s quoted name, which ESRI always writes first.

Returns:

The name, or "" when the element does not open with a quoted string.

property values: tuple[float, ...]

The element’s numeric contents, in written order.

nodes(keyword)[source]

Direct children with a given keyword, in written order.

Parameters:

keyword (str) – Keyword to select, matched without case.

Return type:

tuple[Node, ...]

Returns:

The matching children. Empty when there are none.

node(keyword)[source]

The first direct child with a given keyword.

Parameters:

keyword (str) – Keyword to select, matched without case.

Return type:

Node | None

Returns:

The child, or None when there is none.

descendants(keyword)[source]

Every node with a given keyword, at any depth, in written order.

Parameters:

keyword (str) – Keyword to select, matched without case.

Return type:

tuple[Node, ...]

Returns:

The matching nodes, outermost first.

__init__(keyword, children)