MappingHorizontalPlane#
For deeper information about the concept see: Horizontal Plane Mapper
Class Methods
|
Create a |
Main API Methods
Map coordinates from rays to a horizontal plane. |
|
Assign the plane altitude as height for given coordinates. |
Properties
Return the mapper type. |
|
Return the mapper configuration dictionary. |
|
|
Return the CRS of the mapper (if set). |
|
Return the CRS as WKT string, or |
- class weitsicht.MappingHorizontalPlane(plane_altitude: float | int = 0.0, crs: CRS | None = None)[source]#
Bases:
MappingBaseMapping backend for a horizontal plane at a fixed altitude.
The plane is defined by
plane_altitude(Z coordinate in mapper CRS) and a fixed normal (0, 0, 1). If a CRS transformation is performed, the plane altitude is transformed appropriately via the providedcrs_s/transformerinputs.- Parameters:
plane_altitude (float | int)
crs (CRS | None)
- __init__(plane_altitude: float | int = 0.0, crs: CRS | None = None)[source]#
Create a horizontal plane mapper.
- Parameters:
plane_altitude (float | int) – Altitude of the horizontal plane (Z value in mapper CRS), defaults to
0.0.crs (CRS | None) – CRS of the plane, defaults to
None.
- classmethod from_dict(mapper_dict: Mapping[str, Any]) MappingHorizontalPlane[source]#
Create a
MappingHorizontalPlaneinstance from a configuration dictionary.Required keys: -
type: must behorizontalPlaneOptional keys: -
plane_altitude: plane altitude (float), defaults to0.0-crs: CRS WKT string, defaults toNone- Parameters:
mapper_dict (Mapping[str, Any]) – Mapper configuration dictionary (typically created via
mapper.param_dict).- Returns:
Instantiated mapper.
- Return type:
- Raises:
KeyError – If the dictionary key
typeis missing.ValueError – If the mapper type is unsupported.
CRSInputError – If the CRS WKT string is invalid.
- property type#
Return the mapper type.
- property param_dict#
Return the mapper configuration dictionary.
- Returns:
Mapper configuration dictionary.
- Return type:
dict[str, Any]
- map_coordinates_from_rays(ray_vectors_crs_s: ArrayNx3, ray_start_crs_s: ArrayNx3, crs_s: CRS | None = None, transformer: CoordinateTransformer | None = None) MappingResultSuccess | ResultFailure[Issue][source]#
Map coordinates from rays to a horizontal plane.
- Parameters:
ray_vectors_crs_s (ArrayNx3) – Ray direction vectors (N×3).
ray_start_crs_s (ArrayNx3) – Ray start points (N×3), same shape as
ray_vectors_crs_s.crs_s (CRS | None) – CRS of the input rays, defaults to None.
transformer (CoordinateTransformer | None) – Coordinate transformer to mapper CRS, defaults to None.
- Returns:
Mapping result containing intersection coordinates and a validity mask.
- Return type:
MappingResult
- Raises:
ValueError – If input arrays have incompatible shapes.
CRSInputError – If both
crs_sandtransformerare provided.CoordinateTransformationError – If coordinate transformation fails.
- map_heights_from_coordinates(coordinates_crs_s: ArrayNx3 | ArrayNx2, crs_s: CRS | None = None, transformer: CoordinateTransformer | None = None) MappingResultSuccess | ResultFailure[Issue][source]#
Assign the plane altitude as height for given coordinates.
- Parameters:
coordinates_crs_s (ArrayNx3 | ArrayNx2) – Coordinates to sample (N×2 or N×3).
crs_s (CRS | None) – CRS of the input coordinates, defaults to None.
transformer (CoordinateTransformer | None) – Coordinate transformer to mapper CRS, defaults to None.
- Returns:
Mapping result containing coordinates with plane altitude and a validity mask.
- Return type:
MappingResult
- Raises:
CRSInputError – If both
crs_sandtransformerare provided.CoordinateTransformationError – If coordinate transformation fails.