static void Test9() { CoordinateConverter cc = new CoordinateConverter(); var result = cc.Fr3414To4326Async(27720.130, 48187.789).Result; Debug.WriteLine(result.ToString()); }
static void Test8() { CoordinateConverter cc = new CoordinateConverter(); var result = cc.Fr3414To4326Async(16272.970, 36307.704).Result; Debug.WriteLine(result.ToString()); }
static void Test7() { CoordinateConverter cc = new CoordinateConverter(); var result = cc.Fr3414To4326Async(30629.967, 39105.269).Result; Debug.WriteLine(result.ToString()); }
//------------------------------------------------------------------------------------------------------ static void Test6() { CoordinateConverter cc = new CoordinateConverter(); var result = cc.Fr3414To4326Async(28001.642, 38744.572).Result; Debug.WriteLine(result.ToString()); }
public void Test4() { CoordinateConverter cc = new CoordinateConverter(); Coordinate expected = new Coordinate(); expected.longitude = 103.83080332777138; expected.latitude = 1.4520670518379692; Coordinate input = new Coordinate(); input.X = 27720.130; input.Y = 48187.789; Coordinate actual = cc.Fr3414To4326Async(input).Result; Assert.AreEqual(expected.latitude, actual.latitude, ToleranceLatLong); Assert.AreEqual(expected.longitude, actual.longitude, ToleranceLatLong); }
public void Test3() { CoordinateConverter cc = new CoordinateConverter(); Coordinate expected = new Coordinate(); expected.longitude = 103.72794378041792; expected.latitude = 1.3446255443241177; Coordinate input = new Coordinate(); input.X = 16272.970; input.Y = 36307.704; Coordinate actual = cc.Fr3414To4326Async(input).Result; Assert.AreEqual(expected.latitude, actual.latitude, ToleranceLatLong); Assert.AreEqual(expected.longitude, actual.longitude, ToleranceLatLong); }
public void Test2() { CoordinateConverter cc = new CoordinateConverter(); Coordinate expected = new Coordinate(); expected.longitude = 103.856950349764668; expected.latitude = 1.3699278977737488; Coordinate input = new Coordinate(); input.X = 30629.967; input.Y = 39105.269; Coordinate actual = cc.Fr3414To4326Async(input).Result; Assert.AreEqual(expected.latitude, actual.latitude, ToleranceLatLong); Assert.AreEqual(expected.longitude, actual.longitude, ToleranceLatLong); }
public void Test1() { CoordinateConverter cc = new CoordinateConverter(); Coordinate expected = new Coordinate(); expected.longitude = 103.833333; expected.latitude = 1.366666; Coordinate input = new Coordinate(); input.X = 28001.642; input.Y = 38744.572; Coordinate actual = cc.Fr3414To4326Async(input).Result; Assert.AreEqual(expected.longitude, actual.longitude, ToleranceLatLong); Assert.AreEqual(expected.latitude, actual.latitude, ToleranceLatLong); }
public void Test4() { double easting = 27720.130; double northing = 48187.789; CoordinateConverter cc = new CoordinateConverter(); Coordinate input = new Coordinate(); input.X = easting; input.Y = northing; Coordinate actualonemap = cc.Fr3414To4326Async(input).Result; Svy21Coordinate test = new Svy21Coordinate(northing, easting); LatLongCoordinate actualnus = Svy21.ComputeLatitudeLongitude(test); Assert.AreEqual(actualonemap.longitude, actualnus.Longitude, ToleranceLatLong); Assert.AreEqual(actualonemap.latitude, actualnus.Latitude, ToleranceLatLong); }
public void TestConvert3414to4326Async() { /* https://developers.onemap.sg/commonapi/convert/3414to4326?X=28983.788791079794&Y=33554.5098132845 * * Example Response:{ * "latitude":1.319729571666614, * "longitude":103.84215609236949 * }*/ CoordinateConverter cc = new CoordinateConverter(); Coordinate input = new Coordinate(); input.X = 28983.788791079794; input.Y = 33554.5098132845; Coordinate actual = cc.Fr3414To4326Async(input).Result; Coordinate expected = new Coordinate(); expected.latitude = 1.319729571666614; expected.longitude = 103.84215609236949; Assert.AreEqual(expected.latitude, actual.latitude, ToleranceLatLong); Assert.AreEqual(expected.longitude, actual.longitude, ToleranceLatLong); }