Closed ossama-othman closed 6 years ago
Some parts of this issue have been corrected in commit 09455a8. More fixes to come.
Upon closer examination, the value xmax
is not assumed to be a latitude as originally surmised. Xmax
is derived like so:
lines 2 * xmax
------- = --------
samples 2 * pi (radians)
lines
xmax = ------- * pi
samples
Xmax
scales with the number of lines in the map. The greater the number of lines in the map, the greater maximum latitude.
Calculations in MaRC's Transverse Mercator projection assume that the poles (+/- 90 degrees) may be mapped. That is incorrect since the distortion in that projection approaches infinity at the poles. A user-configurable maximum latitude should be supported for the Mercator projection in a way similar to the Polar Stereographic projection does that.
Furthermore, the
xmax
calculation in theMaRC::Mercator::plot_map()
andplot_grid()
methods seem to assume thatxmax
is a latitude. It is not. TheMaRC::Mercator::mercator_x()
should be used to determinexmax
at the maximum configured latitude range. Determine whether or not the code needs to be corrected.