ossama-othman / MaRC

MaRC - Map Reprojections and Conversions
GNU Lesser General Public License v2.1
1 stars 0 forks source link

Simple cylindrical lower and upper longitude cannot be the same #95

Closed ossama-othman closed 5 years ago

ossama-othman commented 6 years ago

Describe the bug MaRC's Simple Cylindrical projection cannot handle the case where lower and upper longitudes in the map are the same, signifying a 360 degree range. For example, passing 0 as the lo_lon and hi_lon longitude values in the MaRC::SimpleCylindrical constructor results in a map with a single longitude 0 being mapped across all map pixels.

To Reproduce Steps to reproduce the behavior:

  1. Pass 0 as the lo_lon and hi_lon longitude value MaRC::SimpleCylindrical constructor arguments, or set the SIMPLE_C LO_LON and HI_LON values to 0 and 360 (360 fmod()ed to 0), respectively, in the "automation" MaRC GitHub repository branch.

Expected behavior MaRC should either accept Simple Cylindrical lower and upper longitude values that are same, and treat them as lo_lon = ... and hi_lon = lo_lon + 360 (assuming longitudes in degrees), or at least throw an exception about invalid equal longitudes.

A test for the Simple Cylindrical projection that confirms that equal lower and upper longitudes are properly handled should be written as well.

Desktop (please complete the following information):