geo.map.coordinates
2 functions / 0 types
Index
| Function | Description |
|---|---|
| geo_to_world | Read where a place on a map stands in world space, at the map’s morph and transform now. Positions move as the map morphs between the globe and the flat map, and as the map or anything it hangs from moves. |
| world_to_geo | Convert scene XYZ through the map’s current placement and display morph. This does not sample terrain or remove terrain height scale. Returned elevations use the map’s elevation reference. Absolute inputs include the floating-origin offset. |
geo_to_world
def geo_to_world(
*,
map: types.scene.Node,
position: types.geo.GeoPosition,
_transaction_id: str | None = None
) -> types.math.Vec3 | NoneRead where a place on a map stands in world space, at the map’s morph and transform now. Positions move as the map morphs between the globe and the flat map, and as the map or anything it hangs from moves.
Returns nothing before the map’s first frame. Fails with WrongNodeKind when map is not a
map, and with InvalidArgument when point is not a place.
Returns Vec3 | None.
map : Node
The node geo.map.spawn_map answered for the map the place is on.
position : GeoPosition
Omitted elevation uses the displayed ground, or zero before ground is available.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
world_to_geo
def world_to_geo(
*,
map: types.scene.Node,
position: types.math.Vec3,
relative_to: types.scene.Node | None = None,
output_crs: types.geo.CrsId | None = None,
_transaction_id: str | None = None
) -> types.geo.GeoPosition | NoneConvert scene XYZ through the map’s current placement and display morph. This does not sample terrain or remove terrain height scale. Returned elevations use the map’s elevation reference. Absolute inputs include the floating-origin offset.
Returns nothing before the map’s first frame. Fails with WrongNodeKind when map is not a
map, and with InvalidArgument when position is not finite.
Returns GeoPosition | None.
map : Node
The node geo.map.spawn_map answered for the map to read the place on.
position : Vec3
relative_to optional : Node | None
Absent, the position is absolute scene XYZ. Present, XYZ is local to this scene node. Defaults to None.
output_crs optional : CrsId | None
Absent, return the map’s declared coordinate CRS, regardless of its display mode. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.