From 446154f02f8733fdecda50fb84e5832a59116e80 Mon Sep 17 00:00:00 2001 From: matt-lethargic Date: Fri, 28 Sep 2018 22:15:50 +0100 Subject: [PATCH] Removing validation that was put in for lat/long against the specs --- src/GeoJSON.Net/Geometry/Position.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/GeoJSON.Net/Geometry/Position.cs b/src/GeoJSON.Net/Geometry/Position.cs index 663778e3..93bbfe44 100644 --- a/src/GeoJSON.Net/Geometry/Position.cs +++ b/src/GeoJSON.Net/Geometry/Position.cs @@ -22,15 +22,16 @@ public class Position : IPosition, IEqualityComparer, IEquatableThe altitude in m(eter). public Position(double latitude, double longitude, double? altitude = null) { - if (Math.Abs(latitude) > 90) - { - throw new ArgumentOutOfRangeException(nameof(latitude), "Latitude must be a proper lat (+/- double) value between -90 and 90."); - } - - if (Math.Abs(longitude) > 180) - { - throw new ArgumentOutOfRangeException(nameof(longitude), "Longitude must be a proper lon (+/- double) value between -180 and 180."); - } + // Yes I hate commented out code to, but this needs to go right now + //if (Math.Abs(latitude) > 90) + //{ + // throw new ArgumentOutOfRangeException(nameof(latitude), "Latitude must be a proper lat (+/- double) value between -90 and 90."); + //} + + //if (Math.Abs(longitude) > 180) + //{ + // throw new ArgumentOutOfRangeException(nameof(longitude), "Longitude must be a proper lon (+/- double) value between -180 and 180."); + //} Latitude = latitude; Longitude = longitude;