Skip to content

geo.map.transform

3 functions / 2 types

Index

FunctionDescription
getExecute the get statement.
removeMake an ENU node a plain node again, standing where it stands now relative to its map.
setMake a node an ENU node of a map: the node hangs from the map and stands at a place on it with its local x axis east, y north and z up there, and its children are placed in those axes.
TypeDescription
EnuScaleHow an ENU node’s axes scale with the ground under it.
GeographicTransformGeographicTransform

get

def get(
    *,
    node: types.scene.Node,
    _transaction_id: str | None = None
) -> types.geo.map.transform.GeographicTransform | None

Execute the get statement.

Returns GeographicTransform | None.

node : Node

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

remove

def remove(*, node: types.scene.Node, _transaction_id: str | None = None) -> None

Make an ENU node a plain node again, standing where it stands now relative to its map.

Fails with WrongNodeKind when node is not an ENU node.

Returns None.

node : Node

The ENU node.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

set

def set(
    *,
    node: types.scene.Node,
    map: types.scene.Node,
    position: types.geo.GeoPosition,
    scale: types.geo.map.transform.EnuScale | None = None,
    _transaction_id: str | None = None
) -> None

Make a node an ENU node of a map: the node hangs from the map and stands at a place on it with its local x axis east, y north and z up there, and its children are placed in those axes.

The node follows the map through its motion and through the change between the globe and the flat map. With no height it stands on the drawn ground, relief exaggeration included, at sea level until the map holds elevation for the place, and it moves when finer ground arrives. A child ten units up stands ten meters over the place. The axes keep no shear: where the flat map draws east and north at an angle other than square, the children see that angle squared.

The node’s ordinary transform applies inside its ENU frame. Its translation is an ENU offset, followed by its rotation and scale. Removing geographic placement preserves the current pose as an ordinary transform under the map. Despawning the map despawns the node.

Fails with WrongNodeKind when node is not a node or map is not a map, and with InvalidArgument when node is a project node, a viewport camera, a map, or holds map among its children, or when position cannot be converted to the map’s height reference.

Returns None.

node : Node

The node, such as a shape.

map : Node

The node geo.map.spawn_map answered for the map the node stands on.

position : GeoPosition

scale optional : EnuScale | None

Absent, the axes follow the ground. Defaults to None.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

EnuScale

Enum

class EnuScale(IntEnum)

How an ENU node’s axes scale with the ground under it.

Values: FOLLOW_GROUND = 0 East and north each stretch as the drawn ground stretches along them, and up keeps its length. A child offset east or north lands on the ground that far away, on any map. UNIFORM_GROUND_SCALE = 1 The same uniform scale on all axes, preserving shape under map distortion. FIXED_SIZE = 2 No scale: a child is drawn at its own size wherever the node stands.

FOLLOW_GROUND = 0

East and north each stretch as the drawn ground stretches along them, and up keeps its length. A child offset east or north lands on the ground that far away, on any map.

UNIFORM_GROUND_SCALE = 1

The same uniform scale on all axes, preserving shape under map distortion.

FIXED_SIZE = 2

No scale: a child is drawn at its own size wherever the node stands.

GeographicTransform

GeographicTransform(
    *,
    map: types.scene.Node,
    position: types.geo.GeoPosition,
    ground_resolved: bool,
    scale: types.geo.map.transform.EnuScale
)

GeographicTransform

map : Node

position : GeoPosition

ground_resolved : bool

scale : EnuScale