32 #define RADAR_PROJ_ "RadarProj 2023 Markus Peura fmi.fi"
40 #include "drain/util/Proj6.h"
41 #include "drain/util/Rectangle.h"
73 std::stringstream sstr;
74 sstr <<
"+proj=aeqd" <<
" +lon_0=" << lon <<
" +lat_0=" << lat <<
" +ellps=WGS84 +type=crs";
80 void getBoundingBox(
double range,
double & lonLL,
double & latLL,
double & lonUR,
double & latUR)
const {
81 projectFwd(5.0/4.0*M_PI, ::sqrt(2.0)*range, lonLL, latLL);
82 projectFwd(1.0/4.0*M_PI, ::sqrt(2.0)*range, lonUR, latUR);
87 void getBoundingBoxDeg(
double range,
double & lonLL,
double & latLL,
double & lonUR,
double & latUR)
const {
89 lonLL *= drain::RAD2DEG;
90 latLL *= drain::RAD2DEG;
91 lonUR *= drain::RAD2DEG;
92 latUR *= drain::RAD2DEG;
132 s <<
"+proj=aeqd" <<
" +lon_0=" << lon <<
" +lat_0=" << lat <<
" +ellps=WGS84 +type=crs";
148 void getBoundingBox(
double range,
double & lonLL,
double & latLL,
double & lonUR,
double & latUR)
const {
149 projectFwd(5.0/4.0*M_PI, ::sqrt(2.0)*range, lonLL, latLL);
150 projectFwd(1.0/4.0*M_PI, ::sqrt(2.0)*range, lonUR, latUR);
155 void getBoundingBoxDeg(
double range,
double & lonLL,
double & latLL,
double & lonUR,
double & latUR)
const {
157 lonLL *= drain::RAD2DEG;
158 latLL *= drain::RAD2DEG;
159 lonUR *= drain::RAD2DEG;
160 latUR *= drain::RAD2DEG;
165 void setLatLonProjection(){
170 void determineBoundingBoxM(
double range,
double & xLL,
double & yLL,
double & xUR,
double & yUR)
const;
175 determineBoundingBoxM(range, bbox.lowerLeft.x, bbox.lowerLeft.y, bbox.upperRight.x, bbox.upperRight.y);
void setProjectionDst(const std::string &projDef, Projector::CRS_mode crs=Projector::FORCE_CRS)
Sets destination projection.
Definition: Proj6.h:286
void setProjectionSrc(const std::string &projDef, Projector::CRS_mode crs=Projector::FORCE_CRS)
Sets source projection.
Definition: Proj6.h:279
void projectFwd(double &x, double &y) const
Forward projection (in-place)
Definition: Proj6.h:359
Definition: RadarProj.h:53
void setLocation(double lon, double lat)
Sets location of the radar and the azimuthal equidistant (AEQD) projection accordingly.
Definition: RadarProj.h:72
void getBoundingBoxDeg(double range, double &lonLL, double &latLL, double &lonUR, double &latUR) const
Bounding box in degrees.
Definition: RadarProj.h:87
void getBoundingBox(double range, double &lonLL, double &latLL, double &lonUR, double &latUR) const
Bounding box in radians.
Definition: RadarProj.h:80
RadarProj4(double lon=0.0, double lat=0.0)
Sets location of the radar and the azimuthal equidistant (AEQD) projection accordingly.
Definition: RadarProj.h:62
Definition: RadarProj.h:99
RadarProj(double lonDeg=0.0, double latDeg=0.0)
Sets location of the radar and the azimuthal equidistant (AEQD) projection accordingly.
Definition: RadarProj.h:108
void getBoundingBoxDeg(double range, double &lonLL, double &latLL, double &lonUR, double &latUR) const
Bounding box in degrees.
Definition: RadarProj.h:155
void determineBoundingBoxM(double range, drain::Rectangle< double > &bbox) const
Given radar's range, returns the metric bounding box using the current projection.
Definition: RadarProj.h:174
void setSiteLocationDeg(double lon, double lat)
Sets location of the radar and the azimuthal equidistant (AEQD) projection accordingly.
Definition: RadarProj.h:130
void setSiteLocationRad(double lon, double lat)
Sets location of the radar and the azimuthal equidistant (AEQD) projection accordingly.
Definition: RadarProj.h:142
void determineBoundingBoxM(double range, double &xLL, double &yLL, double &xUR, double &yUR) const
Given radar's range, returns the metric bounding box using the current projection.
Definition: RadarProj.cpp:41
void getBoundingBox(double range, double &lonLL, double &latLL, double &lonUR, double &latUR) const
Bounding box in radians.
Definition: RadarProj.h:148
Definition: DataSelector.cpp:44