Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
RadarSVG Class Reference

Vector graphics for both composites and single radar data (polar coordinates). More...

#include <graphics-radar.h>

Collaboration diagram for RadarSVG:
Collaboration graph
[legend]

Classes

struct  CubicBezierConf
 

Public Types

enum  StyleClasses { VECTOR_OVERLAY , HIGHLIGHT , GRID }
 

Public Member Functions

 RadarSVG (int radialBezierResolution=8)
 
 RadarSVG (const RadarSVG &radarSvg)
 
void deriveMaxRange (const Hi5Tree &srcPolar)
 
double getRange (double r=1.0)
 If r is inside +/-100% = [-1.0,1.0], return that portion of maximum range, else the argument as such.
 
void updateRadarConf (const drain::VariableMap &where)
 Read meta data related to polar coordinates, that is, geographic configuration of a single radar.
 
void updateCartesianConf (const drain::VariableMap &where)
 Read meta data related to Cartesian data, that is, geographic configuration of a radar composite.
 
void updateCartesianConf (const Composite &comp)
 
void setRadialResolution (int n)
 Number of "sectors" in a sphere.
 
void getCubicBezierConf (CubicBezierConf &conf, int n) const
 
void getCubicBezierConf (CubicBezierConf &conf, double angleStartR, double angleEndR) const
 
void convert (double radius, double azimuth, drain::Point2D< int > &imgPoint) const
 
void polarToMeters (double radius, double azimuth, drain::Point2D< double > &geoPoint) const
 
void radarGeoToCompositeImage (drain::Point2D< double > &radarPoint, drain::Point2D< int > &imagePoint) const
 
void moveTo (drain::svgPATH &elem, drain::Point2D< int > &imgPoint, double radiusM, double azimuthR) const
 Move to image point at (radius, azimuth)
 
void moveTo (drain::svgPATH &elem, double radius, double azimuth) const
 
void lineTo (drain::svgPATH &elem, double radius, double azimuth) const
 
void lineTo (drain::svgPATH &elem, drain::Point2D< int > &imgPoint, double radiusM, double azimuthR) const
 
void cubicBezierTo (drain::svgPATH &elem, double radiusM, double azimuthStartR, double azimuthEndR) const
 Single command to draw arc.
 
void cubicBezierTo (drain::svgPATH &elem, drain::Point2D< int > &imgPoint, double radiusM, double azimuthStartR, double azimuthEndR) const
 
void close (drain::svgPATH &elem)
 

Static Public Member Functions

static drain::image::TreeSVG & getOverlayStyle (drain::image::TreeSVG &svgDoc)
 Sets some CSS properties applicable in radar graphics (grids, sectors).
 
static drain::image::TreeSVG & getOverlayGroup (drain::image::TreeSVG &svgDoc)
 Get (create) group dedicated for layers drawn over radar data.
 

Public Attributes

RadarProj radarProj
 
drain::image::GeoFrame geoFrame
 Geographic extent and projection (Cartesian)
 
CubicBezierConf conf
 

Protected Attributes

int radialBezierResolution
 
double maxRange = 0.0
 

Detailed Description

Vector graphics for both composites and single radar data (polar coordinates).

This class utilizes SVG elements supporting free draw, especially POLYGON and PATH.

As geographic projections distort lines, arcs and angles, Bezier curves (PATH) are used.

Member Function Documentation

◆ cubicBezierTo() [1/2]

void cubicBezierTo ( drain::svgPATH &  elem,
double  radiusM,
double  azimuthStartR,
double  azimuthEndR 
) const

Single command to draw arc.

Parameters
drain::Point2D<int>& imgPoint - starting point, should be "already" compatible with (radiusM, azimutthStartR)

◆ cubicBezierTo() [2/2]

void cubicBezierTo ( drain::svgPATH &  elem,
drain::Point2D< int > &  imgPoint,
double  radiusM,
double  azimuthStartR,
double  azimuthEndR 
) const
Parameters
drain::Point2D<int>& imgPoint - starting point, should be "already" compatible with (radiusM, azimutthStartR)

◆ getOverlayStyle()

drain::image::TreeSVG & getOverlayStyle ( drain::image::TreeSVG &  svgDoc)
static

Sets some CSS properties applicable in radar graphics (grids, sectors).

Creates a style element only if it does not exist already.

More general style is obtained with RackSVG::getStyle().

◆ updateCartesianConf()

void updateCartesianConf ( const drain::VariableMap where)

Read meta data related to Cartesian data, that is, geographic configuration of a radar composite.

This command can be used together with configurePolar().

◆ updateRadarConf()

void updateRadarConf ( const drain::VariableMap where)

Read meta data related to polar coordinates, that is, geographic configuration of a single radar.

This command can be used together with configureCartesian().


The documentation for this class was generated from the following files: