Viewing
Viewing geometry configurations that control the sensor's line of sight, ranging from explicit angular directions to look-at targets, hemispherical sampling, and distant (parallel-ray) projections.
s2gos_simulator.config.viewing.AngularViewing
pydantic-model
Bases: BaseViewing
Viewing defined by zenith and azimuth angles, typically relative to a target.
This is ideal for distant sensors (satellites).
Fields:
Attributes
target
pydantic-field
Center of the observed area [x, y, z]. If None, defaults to scene center [0,0,0].
s2gos_simulator.config.viewing.AngularFromOriginViewing
pydantic-model
Bases: BaseViewing
Viewing defined by an origin position and zenith/azimuth angles from that origin.
This is ideal for radiancemeters and cameras where you know the sensor position and want to specify the pointing direction with angles.
Fields:
-
type(Literal['angular_from_origin']) -
origin(List[float]) -
zenith(float) -
azimuth(float) -
up(Optional[List[float]]) -
terrain_relative_height(bool) -
relative_to_asset(Optional[str])
Attributes
relative_to_asset
pydantic-field
Asset ID to use as reference frame. When set, origin is interpreted as an offset in the asset's local coordinate system and transformed by the asset's position, rotation, and scale.
terrain_relative_height
pydantic-field
If True, z-coordinate in origin is offset from terrain surface. Backend will query DEM elevation at (x, y) and add z offset. If False (default), z-coordinate is absolute elevation in scene coordinate system.
type
pydantic-field
Viewing type (always 'angular_from_origin')
up
pydantic-field
Up direction for cameras [x, y, z] (default Z-up)
s2gos_simulator.config.viewing.LookAtViewing
pydantic-model
Bases: BaseViewing
Viewing defined by an origin and a target point.
This is ideal for UAVs or perspective cameras where the exact position of the sensor and its target are known.
Fields:
-
type(Literal['directional']) -
origin(List[float]) -
target(List[float]) -
up(Optional[List[float]]) -
terrain_relative_height(bool) -
relative_to_asset(Optional[str])
Attributes
relative_to_asset
pydantic-field
Asset ID to use as reference frame. When set, origin and target are interpreted as offsets in the asset's local coordinate system and transformed by the asset's position, rotation, and scale.
terrain_relative_height
pydantic-field
If True, z-coordinates in origin and target are offsets from terrain surface. Backend will query DEM elevation at (x, y) and add z offset. If False (default), z-coordinates are absolute elevations in scene coordinate system.
type
pydantic-field
Viewing type (always 'directional')
s2gos_simulator.config.viewing.HemisphericalViewing
pydantic-model
Bases: BaseViewing
Viewing that covers the entire upper or lower hemisphere.
Fields:
-
type(Literal['hemispherical']) -
origin(List[float]) -
upward_looking(bool) -
terrain_relative_height(bool)
Attributes
terrain_relative_height
pydantic-field
If True, z-coordinate in origin is offset from terrain surface. Backend will query DEM elevation at (x, y) and add z offset. If False (default), z-coordinate is absolute elevation in scene coordinate system.
type
pydantic-field
Viewing type (always 'hemispherical')
s2gos_simulator.config.viewing.DistantViewing
pydantic-model
Bases: BaseViewing
Distant viewing for BRF measurements using mdistant measure.
Models an infinitely distant sensor looking at a target area. Uses Eradiate's MultiDistantMeasure with rectangular targets for pixel-level BRF measurements.
The sensor looks in the direction specified by direction (default: [0, 0, 1]
meaning looking down from above / nadir view).
Fields:
-
type(Literal['distant']) -
target(Optional[Union[List[float], RectangleTarget]]) -
direction(List[float]) -
ray_offset(Optional[float]) -
terrain_relative_height(bool)
Attributes
direction
pydantic-field
Viewing direction vector. Default [0, 0, 1] means looking straight down (nadir view). For oblique views, adjust accordingly.
ray_offset
pydantic-field
Distance between target and ray origins in meters. If unset, ray origins are positioned automatically outside the scene.
target
pydantic-field
Target specification. Either: - [x, y, z] point for a point target - RectangleTarget for a rectangular area (pixel BRF)
terrain_relative_height
pydantic-field
For point targets [x, y, z]: if True, z is offset from terrain. For RectangleTarget: this field is ignored (rectangles use absolute z).
s2gos_simulator.config.viewing.RectangleTarget
pydantic-model
Bases: BaseModel
Rectangle target specification for distant measurements.
Defines an axis-aligned rectangle at a specific altitude for mdistant targets. Used for pixel-level BRF measurements where we want to measure the reflectance leaving a specific rectangular area.
Fields:
Validators:
Attributes
Functions
from_center_and_size
classmethod
from_center_and_size(
cx: float,
cy: float,
width: float,
height: Optional[float] = None,
z: float = 0.0,
) -> "RectangleTarget"
Create rectangle from center point, dimensions, and altitude.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cx
|
float
|
Center X coordinate in meters |
required |
cy
|
float
|
Center Y coordinate in meters |
required |
width
|
float
|
Width in meters |
required |
height
|
Optional[float]
|
Height in meters (defaults to width for square) |
None
|
z
|
float
|
Altitude in meters (default 0.0) |
0.0
|
Returns:
| Type | Description |
|---|---|
'RectangleTarget'
|
RectangleTarget instance |