37 bool overlaps(
double a0,
double a1,
double b0,
double b1)
39 return b0<=a0 && a0<=b1 || b0<=a1 && a1<=b1;
42 GeoTiles(std::string base_url,
double width_meters)
52 std::string
getURL(
double xUTM,
double yUTM)
59 std::string
getURL(
double X0,
double Y0,
double X1,
double Y1,
double res)
61 int width_start =
base_url_.find(
"width=",0)+6;
62 int width_end =
base_url_.find(
"&",width_start);
63 int height_start =
base_url_.find(
"height=",0)+7;
64 int height_end =
base_url_.find(
"&",height_start);
71 if(width_start<height_start)
75 <<
base_url_.substr(width_end,height_start-width_end)
83 <<
base_url_.substr(height_end,width_start-height_end)
87 ss<<std::fixed<<std::setprecision(0);
91 std::string
getURL(std::pair<int,int>
id)
107 bool overlapsBox(std::pair<int,int>
id,
double xUTM0,
double yUTM0,
double xUTM1,
double yUTM1)
115 void getVisibleRange(
double xUTM0,
double yUTM0,
double xUTM1,
double yUTM1,
int& imin,
int& jmin,
int& imax,
int& jmax)
126 s<<
"#GeoTile("<<
id.first<<
","<<
id.second<<
")";
Class to help with handling of tile servers used for satellite image background tiles.
Definition: geoTiles.h:33
double width_meters_
Definition: geoTiles.h:35
bool overlaps(double a0, double a1, double b0, double b1)
Definition: geoTiles.h:37
std::string getURL(std::pair< int, int > id)
Definition: geoTiles.h:91
double getCenterY(std::pair< int, int > id)
Definition: geoTiles.h:99
double getWidthM()
Definition: geoTiles.h:48
double getCenterX(std::pair< int, int > id)
Definition: geoTiles.h:95
std::pair< int, int > getTileID(double xUTM, double yUTM)
Definition: geoTiles.h:103
std::string getURL(double xUTM, double yUTM)
Definition: geoTiles.h:52
void getVisibleRange(double xUTM0, double yUTM0, double xUTM1, double yUTM1, int &imin, int &jmin, int &imax, int &jmax)
Definition: geoTiles.h:115
std::string base_url_
Definition: geoTiles.h:36
std::string getPlotID(std::pair< int, int > id)
Definition: geoTiles.h:122
std::string getURL(double X0, double Y0, double X1, double Y1, double res)
Definition: geoTiles.h:59
bool overlapsBox(std::pair< int, int > id, double xUTM0, double yUTM0, double xUTM1, double yUTM1)
Definition: geoTiles.h:107
GeoTiles(std::string base_url, double width_meters)
Definition: geoTiles.h:42
T min(T a, T b, T c, T d)
Definition: adoremath.h:663
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
x
Definition: adore_set_goal.py:30
y
Definition: adore_set_goal.py:31
Definition: areaofeffectconverter.h:20