7 Commits

Author SHA1 Message Date
Ieuan Walker
e84c9b9a4d Polygon - Generate Geo polygon around a specific point (#53)
* Add Polygon class with geospatial methods and tests

Implemented a new static `Polygon` class in the `GeoUK` namespace for generating polygons around geographic points. The class includes input validation and methods for degree-radian conversion.

Also added a suite of unit tests in `PolygonTests.cs` using Xunit to cover various scenarios, ensuring the correctness and performance of the `GeneratePolygonAroundPoint` method.

* Fix longitude normalization in Polygon.cs

Updated longitude normalization to the range of [-180, 180]
instead of [-180, 180). Adjusted logic to correctly handle
values exceeding the bounds by adding or subtracting 360.0
as necessary, ensuring proper wrapping of longitude values.

* Add GeoUK.OSTN.XUnit project and update README.md

- Included a new project `GeoUK.OSTN.XUnit` in the solution.
- Added `pr.yml` to the Solution Items section.
- Enhanced `README.md` with a new section on generating polygons around points, including code examples and a link to GeoJson.io for testing.
2025-07-29 10:55:42 +01:00
Ieuan Walker
725df9ad9e Create release.yml (#48)
* Add CI/CD workflows for release and testing

- Introduced `release.yml` for building, testing, and publishing `GeoUK` and `GeoUK.OSTN` projects to NuGet.org on release events.
- Updated `pr.yml` to include .NET setup, dependency restoration, building, and testing steps.
- Modified `GeoUK.OSTN.sln` to include the new `GeoUK.OSTN.XUnit` project and ensure proper workflow file references.

* Update release.yml to pack NuGet packages for projects

Replaced dotnet build commands with dotnet pack for the
GeoUK and GeoUK.OSTN projects in the release workflow.
This change prepares the projects for distribution by
creating NuGet packages instead of just building them.
2025-07-11 13:01:31 +01:00
Ieuan Walker
53a391e3e3 Create pr.yml (#47)
* Create dotnet.yml

* Replace dotnet.yml with pr.yml for GitHub Actions

Updated the workflow to build and test a .NET project on pull requests to the master branch. Removed the old `dotnet.yml` file and added a new `pr.yml` file with necessary steps for setup, restore, build, and test.

Updated the Visual Studio version in `GeoUK.OSTN.sln` from 16 to 17 and added a "Solution Items" section to include the new `pr.yml` file in the project structure.

* Update workflow name in pr.yml

Changed the workflow name from `.NET` to `PullRequest` for better clarity and to indicate its purpose in handling pull requests.

* Update build command to use Release configuration

Modified the `dotnet build` command to include the `--configuration Release` option. This change ensures that the build process targets the Release mode instead of the default Debug mode, enhancing the overall build process.

* Update build and test commands in pr.yml

Added `--configuration Release` to `dotnet build` and
`dotnet test` commands to ensure optimized performance
for production environments. The `--no-restore` and
`--no-build` options remain unchanged.
2025-07-11 12:43:54 +01:00
Ieuan Walker
81b27d1210 Test folder created 2019-07-16 13:37:03 +01:00
Ieuan Walker
cdc3855537 Code updates based on Codacy and updated test project from .net framework to .net core 2019-07-16 13:20:17 +01:00
Ieuan Walker
da2d5c5002 Demo project created 2019-07-13 00:07:52 +01:00
Ieuan Walker
46fa68a28a Add project files. 2019-07-12 18:39:10 +01:00