pub struct RenderMetadata { /* private fields */ }Expand description
Metadata describing the pixel-to-coordinate mapping of a rendered image.
This is everything a consumer needs to place and query the rendered image.
Implementations§
Source§impl RenderMetadata
impl RenderMetadata
Sourcepub fn center_pixel(&self) -> (f64, f64)
pub fn center_pixel(&self) -> (f64, f64)
Center of the image in pixel coordinates.
Sourcepub fn pixels_per_km(&self) -> f64
pub fn pixels_per_km(&self) -> f64
Scale factor: pixels per kilometer.
Sourcepub fn max_range_km(&self) -> f64
pub fn max_range_km(&self) -> f64
Maximum range of the rendered data in km.
Sourcepub fn elevation_degrees(&self) -> Option<f32>
pub fn elevation_degrees(&self) -> Option<f32>
The elevation angle of the rendered sweep (if applicable).
Sourcepub fn geo_extent(&self) -> Option<&GeoExtent>
pub fn geo_extent(&self) -> Option<&GeoExtent>
Geographic extent of the rendered area (if coordinate system was provided).
Sourcepub fn coord_system(&self) -> Option<&RadarCoordinateSystem>
pub fn coord_system(&self) -> Option<&RadarCoordinateSystem>
The coordinate system used (if available), enabling conversion between pixel, polar, and geographic coordinates.
Sourcepub fn pixel_to_polar(&self, x: f64, y: f64) -> Option<PolarPoint>
pub fn pixel_to_polar(&self, x: f64, y: f64) -> Option<PolarPoint>
Convert a pixel coordinate to polar (azimuth, range) coordinates.
Returns None if the pixel is outside the rendered radar coverage area.
Sourcepub fn polar_to_pixel(&self, azimuth_degrees: f32, range_km: f64) -> (f64, f64)
pub fn polar_to_pixel(&self, azimuth_degrees: f32, range_km: f64) -> (f64, f64)
Convert polar coordinates to a pixel coordinate.
Sourcepub fn pixel_to_geo(&self, x: f64, y: f64) -> Option<GeoPoint3D>
pub fn pixel_to_geo(&self, x: f64, y: f64) -> Option<GeoPoint3D>
Convert a pixel coordinate to geographic coordinates.
Requires a coordinate system. Returns None if no coordinate system is
available or the pixel is outside the radar coverage area.
Sourcepub fn geo_to_pixel(&self, point: &GeoPoint) -> Option<(f64, f64)>
pub fn geo_to_pixel(&self, point: &GeoPoint) -> Option<(f64, f64)>
Convert geographic coordinates to a pixel coordinate.
Requires a coordinate system. Returns None if no coordinate system is available.
Sourcepub fn pixel_distance_to_km(&self, pixels: f64) -> f64
pub fn pixel_distance_to_km(&self, pixels: f64) -> f64
Get the range in km for a given pixel distance from center.
Sourcepub fn km_to_pixel_distance(&self, km: f64) -> f64
pub fn km_to_pixel_distance(&self, km: f64) -> f64
Get the pixel distance from center for a given range in km.
Trait Implementations§
Source§impl Clone for RenderMetadata
impl Clone for RenderMetadata
Source§fn clone(&self) -> RenderMetadata
fn clone(&self) -> RenderMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RenderMetadata
impl RefUnwindSafe for RenderMetadata
impl Send for RenderMetadata
impl Sync for RenderMetadata
impl Unpin for RenderMetadata
impl UnsafeUnpin for RenderMetadata
impl UnwindSafe for RenderMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more