Releases: Tronald/CoordinateSharp
3.1.1.1
-Removed deprecated items: This is a breaking change for any projects still referencing obsolete classes or methods.
-Added .NET 9 support: The application now includes full compatibility with .NET 9.
-Extended MoonIllum properties: Added a new moonAge property to the MoonIllum class.
-Enhanced GeoFence point handling: Added the ability to reorder GeoFence points with right-hand or left-hand orientation.
-Added GeoJson support: New functionality to build GeoJson objects directly from GeoFences.
// Create the outer boundary and order (right-handed)
List<GeoFence.Point> outerPoints = new List<GeoFence.Point>
{
new Coordinate(47.6062, -122.3321), // Seattle
new Coordinate(48.7519, -122.4787), // Bellingham
new Coordinate(47.2529, -122.4443), // Tacoma
new Coordinate(48.0419, -122.9025), // Port Townsend
new Coordinate(47.6588, -117.4260), // Spokane
new Coordinate(46.6021, -120.5059), // Yakima
new Coordinate(46.7324, -117.0002), // Pullman
new Coordinate(48.3102, -122.6290), // Anacortes
new Coordinate(47.8225, -122.3123), // Edmonds
new Coordinate(46.9787, -123.8313), // Aberdeen
new Coordinate(47.0379, -122.9007), // Olympia
new Coordinate(47.6091, -122.2015), // Bellevue
new Coordinate(47.6787, -120.7141), // Leavenworth
new Coordinate(48.0812, -123.2643), // Port Angeles
new Coordinate(46.7152, -122.9522) // Centralia
};
GeoFence outerFence = new GeoFence(outerPoints);
outerFence.OrderPoints_RightHanded();
outerFence.ClosePolygon();
// Create an inner boundary and order (left-handed)
List<Coordinate> innerPoints = new List<Coordinate>()
{
new Coordinate(46.8523, -121.7603), // Mount Rainier (center point)
new Coordinate(46.8625, -121.7401), // Slightly north-east
new Coordinate(46.8421, -121.7805), // Slightly south-west
new Coordinate(46.8650, -121.7850), // North-west
new Coordinate(46.8400, -121.7500) // South-east
};
GeoFence innerFence = new GeoFence(innerPoints);
innerFence.OrderPoints_LeftHanded();
innerFence.ClosePolygon();
// Build the GeoJSON polygon with the outer and inner boundaries
string geoJson = GeoFence.GeoJsonPolygonBuilder(outerFence, new List<GeoFence> { innerFence });
v2.24.2.1
2.24.2.1
-Fixes critical bug causing exceptions near poles.
2.24.1.1
-Fixes bugs causing incorrect sun condition to report in circumpolar regions during slow transition at horizon.
-Adds overload to GeoFence.Denisfy()
to allow custom specification of earth shape during point densification.
2.24.1.1 (bugged)
-Fixes bugs causing incorrect sun condition to report in circumpolar regions during slow transition at horizon.
-Adds overload to GeoFence.Denisfy()
to allow custom specification of earth shape during point densification.
2.23.1.1
Adds the ability to densify polylines to mitigate geofence spherical distortions over long distances.
nuget: https://www.nuget.org/packages/CoordinateSharp/2.23.1.1
//Create a four point GeoFence around Utah
List<GeoFence.Point> points = new List<GeoFence.Point>();
points.Add(new GeoFence.Point(41.003444, -109.045223));
points.Add(new GeoFence.Point(41.003444, -102.041524));
points.Add(new GeoFence.Point(36.993076, -102.041524));
points.Add(new GeoFence.Point(36.993076, -109.045223));
points.Add(new GeoFence.Point(41.003444, -109.045223));
GeoFence gf = new GeoFence(points);
// Densify the geofence to plot a coordinate every 5 kilometers using Vincenty to account for Earth's shape
gf.Densify(new Distance(5, DistanceType.Kilometers));
2.22.1.1
-Adds Hours of Day DaySpan
and Hours of Night NightSpan
TimeSpan
properties to the CelestialInfo
class for easier calculation of total day and night hours for a date at a specified location.
Example:
Coordinate c = new Coordinate(-47, -122, new DateTime(2023, 9, 30));
c.Offset = -7;
Console.WriteLine("DAY SPAN: " + c.CelestialInfo.DaySpan.TotalHours); //12.5616666666667
Console.WriteLine("NIGHT SPAN: " + c.CelestialInfo.NightSpan.TotalHours); //11.4383333333333
v2.21.1.1
-Adds .NET 8.0 support.
-Adds magnitude and coverage properties to solar eclipse data.
-Adds umbral and penumbral magnitude properties to lunar eclipse data..
-Removes BinarySerialization from unit tests. Used JSON to store test object for eclipse comparison.
-Adds correctly named PartialEclipseEnd
property to SolarEclipseDetails
and deprecates incorrectly named property.
-Various documentation updates.
v2.20.1.1
- Adds ability to estimate time of day from sun azimuth.
//Create a coordinate and specify a date.
Coordinate c = new Coordinate(49, -122, new DateTime(2023, 9, 30));
//Set local UTC offset as desired.
c.Offset = -7;
//Set current sun azimuth in degrees E of N
double az = 120;
//Determine time of day. Default azimuth accuracy error delta is 1 degree by default,
//but it is set at .5 for this example.
DateTime? t = Celestial.Get_Time_At_Solar_Azimuth(az, c, .5);
Console.WriteLine($"{t}"); //9/30/2023 9:21:44 AM
- Adds "out of bounds" check to UTM initialization, allowing users to detect over projection.
var utm = new UniversalTransverseMercator("Q", 61, 581943.5, 2111989.8);
utm.Out_Of_Bounds; //true. zone 61 is outside of limits
-
Deprecates 'AstrologicalSigns' class and replaces with new 'AlmanacMoonName' class.
-
Various documentation fixes.
v2.19.1.1
v2.18.1.1
-Improves UTM and MGRS conversion efficiency by 13x.
-Adds ability create geofence from a specified GEOREF coordinate and precision level.
-Adds ability to locate GEOREF box corners based on a given precision level.
-Restricts GEOREF easting and northing minutes and seconds to 59.999... to comply with library standards.
Examples;
int precision = 6;
//Get GeoFence
GEOFENCE fence = georef.ToGeoFence(precision);
//Get Corners
GEOREF bl = georef.Get_BottomLeftCorner(precision);
GEOREF tr = georef.Get_TopRightCorner(precision);
v2.17.1.1
-Adds ability to operate Coordinate objects in the environment's local time by default.
//Set at application startup
GlobalSettings.Allow_Coordinate_DateTimeKind_Specification = true;
//EST Date 21-MAR-2019 @ 07:00 AM Local
DateTime d = new DateTime(2017,3,21,7,0,0);
Coordinate c = new Coordinate(40.57682, -70.75678, d);
.CelestialInfo.SunRise.ToString(); //Outputs 3/21/2017 06:45:00 AM
-Update branding package & license.