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
azimuth
pydantic-field
azimuth: float = 0.0
Viewing azimuth angle
target
pydantic-field
target: Optional[List[float]] = None
Center of the observed area [x, y, z]. If None, defaults to scene center [0,0,0].
type
pydantic-field
type: Literal['angular'] = 'angular'
Viewing type (always 'angular')
zenith
pydantic-field
zenith: float = 0.0
Viewing zenith angle (0=nadir, 90=horizon, 180=upward)
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
azimuth
pydantic-field
azimuth: float = 0.0
Pointing azimuth angle (0=East, 90=North)
origin
pydantic-field
origin: List[float]
3D sensor position [x, y, z] in meters
relative_to_asset
pydantic-field
relative_to_asset: Optional[str] = None
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
terrain_relative_height: bool = False
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
type: Literal["angular_from_origin"] = "angular_from_origin"
Viewing type (always 'angular_from_origin')
up
pydantic-field
up: Optional[List[float]] = [0, 0, 1]
Up direction for cameras [x, y, z] (default Z-up)
zenith
pydantic-field
zenith: float = 0.0
Pointing zenith angle (0=up, 90=horizon, 180=nadir)
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
origin
pydantic-field
origin: List[float]
3D sensor position [x, y, z] in meters
relative_to_asset
pydantic-field
relative_to_asset: Optional[str] = None
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.
target
pydantic-field
target: List[float] = [0.0, 0.0, 0.0]
3D target position [x, y, z] in meters
terrain_relative_height
pydantic-field
terrain_relative_height: bool = False
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
type: Literal['directional'] = 'directional'
Viewing type (always 'directional')
up
pydantic-field
up: Optional[List[float]] = [0, 0, 1]
Up direction for cameras [x, y, z] (default Z-up)
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
origin
pydantic-field
origin: List[float]
3D sensor position [x, y, z] in meters.
terrain_relative_height
pydantic-field
terrain_relative_height: bool = False
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
type: Literal['hemispherical'] = 'hemispherical'
Viewing type (always 'hemispherical')
upward_looking
pydantic-field
upward_looking: bool = True
True for upward-looking (sky), False for downward-looking (ground)
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
direction: List[float] = [0, 0, 1]
Viewing direction vector. Default [0, 0, 1] means looking straight down (nadir view). For oblique views, adjust accordingly.
ray_offset
pydantic-field
ray_offset: Optional[float] = None
Distance between target and ray origins in meters. If unset, ray origins are positioned automatically outside the scene.
target
pydantic-field
target: Optional[Union[List[float], RectangleTarget]] = None
Target specification. Either: - [x, y, z] point for a point target - RectangleTarget for a rectangular area (pixel BRF)
terrain_relative_height
pydantic-field
terrain_relative_height: bool = True
For point targets [x, y, z]: if True, z is offset from terrain. For RectangleTarget: this field is ignored (rectangles use absolute z).
type
pydantic-field
type: Literal['distant'] = 'distant'
Viewing type (always 'distant')
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
type
pydantic-field
type: Literal['rectangle'] = 'rectangle'
Target type (always 'rectangle')
xmax
pydantic-field
xmax: float
Maximum X coordinate in meters
xmin
pydantic-field
xmin: float
Minimum X coordinate in meters
ymax
pydantic-field
ymax: float
Maximum Y coordinate in meters
ymin
pydantic-field
ymin: float
Minimum Y coordinate in meters
z
pydantic-field
z: float = 0.0
Altitude (z-coordinate) in meters
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 |
validate_bounds
pydantic-validator
validate_bounds()
Ensure bounds are valid (min < max).