| 955 | } |
| 956 | |
| 957 | double DistancePlotDlg::GetThreshMax() |
| 958 | { |
| 959 | if (maxdist_choice->GetSelection() == 0) { |
| 960 | if (IsArc()) { |
| 961 | double r = project->GetMaxDistArc(); |
| 962 | if (IsMi()) return GenGeomAlgs::EarthRadToMi(r); |
| 963 | return GenGeomAlgs::EarthRadToKm(r); |
| 964 | } |
| 965 | return project->GetMaxDistEuc(); |
| 966 | } else { |
| 967 | // using bbox diagonal |
| 968 | double minx, miny, maxx, maxy; |
| 969 | project->GetMapExtent(minx, miny, maxx, maxy); |
| 970 | double xx = (maxx - minx); |
| 971 | double yy = (maxy - miny); |
| 972 | double r = sqrt(xx * xx + yy * yy) / 2.0; |
| 973 | |
| 974 | if (IsArc()) { |
| 975 | if (IsMi()) return GenGeomAlgs::EarthRadToMi(r); |
| 976 | return GenGeomAlgs::EarthRadToKm(r); |
| 977 | } else |
| 978 | return r; |
| 979 | } |
| 980 | } |
| 981 | |
| 982 | |
| 983 |
nothing calls this directly
no test coverage detected