This project is read-only.
1

Closed

MGRS System bug

description

There is an issue on the constructor of MGRS class. If I pass both east and north value below 10,000, it will be pumped up to higher than 10,000 and cause the target point greatly miss.
 
You can try this bug with the following code.
 
 
Geographic geo = new Geographic(
            new GeoUtility.GeoSystem.Helper.Sexagesimal(10, 0, 0).ToDecimal()
            , new GeoUtility.GeoSystem.Helper.Sexagesimal(10, 0, 40).ToDecimal()
            );
        Console.WriteLine(geo.ToSexagesimalString());
 
        Console.WriteLine(((MGRS)geo).ToLongString());
        Console.WriteLine(((UTM)geo).ToLongFormatString());
        Console.WriteLine(((Geographic)((MGRS)geo)).ToSexagesimalString());
 
This code will output like this.
 
 
Longitude: 10? 00' 00'' 00'''; Latitude: 10? 00' 39'' 60''' (WGS84)
32P PS 9597 6807
32P E 609597 N 1106807
Longitude: 10? 47' 27'' 38'''; Latitude: 10? 33' 41'' 50''' (WGS84)

 
Thanks for your good works and I hope this will be fixed soon.
Closed May 4, 2011 at 10:05 AM by geoutility
Solved at revision 58022.Thanks for reporting.

comments