86 Commits

Author SHA1 Message Date
Ieuan Walker
c58fac4dde LatitudeLongitude from easting northing helper (#54)
* Refactor LatitudeLongitude class and add conversion method

Updated `LatitudeLongitude.cs` to include new using directives for `GeoUK.Ellipsoids` and `GeoUK.Projections`. The class structure has been improved for clarity, and a new static method `FromEastingNorthing` has been added to convert easting and northing coordinates to latitude and longitude using Cartesian transformations and projections.

* Update GeoUK/Coordinates/LatitudeLongitude.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix comment typo in LatitudeLongitude.cs

Removed incorrect comment about ETRS89 and WGS84.
No changes to functionality; transformation logic remains intact.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1.3.0
2025-07-29 18:10:22 +01:00
dependabot[bot]
be72e405dc Bump xunit.runner.visualstudio from 3.1.1 to 3.1.3 (#52)
---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-version: 3.1.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-29 10:58:03 +01:00
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.
1.2.0
2025-07-29 10:55:42 +01:00
Ieuan Walker
573ee64aa8 Update README.md (#50) 2025-07-11 13:26:36 +01:00
Ieuan Walker
7a50f69977 Release.yml fixes (#49)
* Update project files for packaging enhancements

Added icon file for packaging and updated project metadata.
Replaced `<PackageIconUrl>` with `<PackageIcon>` for local reference.
Modified `<Description>` and restored `<Copyright>` in `GeoUK.csproj`.

* Update NuGet package paths in release.yml

Added "IeuanWalker." prefix to GeoUK and GeoUK.OSTN
packages in upload and publish paths. This ensures
correct referencing of new package names during the
release process.
1.1.0
2025-07-11 13:10:53 +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
c42eee7ae5 Update unit test nugets (#46)
* Update testing packages in project file

Upgraded `Microsoft.NET.Test.Sdk` to version `17.14.1`,
`xunit` to version `2.9.3`, and `xunit.runner.visualstudio`
to version `3.1.1` in `GeoUK.OSTN.XUnit.csproj` for improved
compatibility, performance, and access to new features.

* Update project to target netstandard2.0

The project file `DemoProject.csproj` has been modified to use the `netstandard2.0` target framework instead of `netcoreapp2.2`. XML formatting has been improved with added indentation for better readability, while project references remain unchanged but are now consistently indented.
2025-07-11 11:31:14 +01:00
markgloverswaybtinternetcom
2e41a3d860 Update Osgb36.cs with variable precision grid reference (#45)
* Update Osgb36.cs

Replace fixed imprecise grid reference with variable precision one

* Compatible default OS Digits

Alter default OS Digits to be compatible with existing code

* Refactor OsDigits initialization and GetBngSquare logic

- Initialize OsDigits property to OsDigitsType.OsDigits6 by default.
- Remove redundant assignment of OsDigits in the constructor.
- Reformat switch statement for clarity.
- Improve readability of conditional check in GetBngSquare method.

* Update terminology from "metre" to "meter"

Changed comments for OS Grid Reference digit types to use "meter" instead of "metre" for 6, 8, 10, and 12 digit references, aligning with American English conventions.

* Update project to target .NET 9.0 and improve formatting

The project file `GeoUK.OSTN.XUnit.csproj` has been updated to target .NET 9.0 instead of .NET Core 2.2. The structure of the `<PropertyGroup>` and `<ItemGroup>` elements has been adjusted for better formatting, while the content remains unchanged. Additionally, the `<None>` and `<Content>` items have been reformatted for consistency, and the `<PackageReference>` and `<ProjectReference>` elements have been improved for readability.

---------

Co-authored-by: Ieuan Walker <walker.ieuan@gmail.com>
2025-07-11 11:21:35 +01:00
Ieuan Walker
27a4341f91 Merge pull request #38 from IeuanWalker/IeuanWalker-patch-2
Update README.md
2024-09-18 11:49:01 +01:00
Ieuan Walker
fd1cd329e2 Update README.md 2024-09-18 11:48:50 +01:00
Ieuan Walker
e9a033466c Create FUNDING.yml 2022-07-18 18:08:52 +01:00
Ieuan Walker
589621ed02 Merge pull request #18 from IeuanWalker/dependabot/add-v2-config-file
Create Dependabot config file
2021-04-21 17:34:04 +01:00
dependabot-preview[bot]
67b7d11505 Create Dependabot config file 2021-04-21 16:30:16 +00:00
Ieuan Walker
7d05a31c27 Merge pull request #12 from IeuanWalker/IeuanWalker-patch-1
Update README.md
2020-08-14 13:42:31 +01:00
Ieuan Walker
b8f9fec5ca Update README.md 2020-08-14 13:36:38 +01:00
Ieuan Walker
b9644defb8 Merge pull request #4 from IeuanWalker/dependabot/nuget/Microsoft.NET.Test.Sdk-16.5.0
Bump Microsoft.NET.Test.Sdk from 16.4.0 to 16.5.0
2020-04-04 17:15:23 +01:00
dependabot-preview[bot]
fe310e721f Bump Microsoft.NET.Test.Sdk from 16.4.0 to 16.5.0
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.4.0 to 16.5.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.4.0...v16.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-06 07:08:05 +00:00
Ieuan Walker
ea90b16360 Bump Microsoft.NET.Test.Sdk from 16.2.0 to 16.4.0 (#3)
Bump Microsoft.NET.Test.Sdk from 16.2.0 to 16.4.0
2019-11-28 18:38:35 +00:00
Ieuan Walker
09aad1207c update readme.md - better badge display 2019-11-28 18:37:20 +00:00
Ieuan Walker
dd95b8bab0 update readme.md - better badge display 2019-11-28 18:35:55 +00:00
dependabot-preview[bot]
e3adf49f14 Bump Microsoft.NET.Test.Sdk from 16.2.0 to 16.4.0
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.2.0 to 16.4.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.2.0...v16.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-28 17:06:20 +00:00
Ieuan Walker
2782a70e8d Merge branch 'master' of https://github.com/IeuanWalker/GeoUK 2019-08-16 18:29:09 +01:00
Ieuan Walker
66fefc3219 Licence file added 2019-08-16 18:28:54 +01:00
Ieuan Walker
b4803e3014 Update azure-pipelines.yml for Azure Pipelines 2019-07-18 14:50:04 +01:00
Ieuan Walker
fbae0b2506 Update azure-pipelines.yml for Azure Pipelines 2019-07-18 14:32:38 +01:00
Ieuan Walker
227c1b0541 Update azure-pipelines.yml for Azure Pipelines 2019-07-18 14:27:26 +01:00
Ieuan Walker
ab60e9410e update readme
Removed chevron to allow cmd package install copy
2019-07-16 13:43:49 +01:00
Ieuan Walker
155e08c277 fixed readme type 2019-07-16 13:42:46 +01:00
Ieuan Walker
81b27d1210 Test folder created 2019-07-16 13:37:03 +01:00
Ieuan Walker
0938749737 Version update 2019-07-16 13:28:19 +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
8f5c72a3dd Renamed method to match previous package 2019-07-16 12:59:43 +01:00
Ieuan Walker
78bb2b119a update readme better warning of use of second package 2019-07-15 11:19:38 +01:00
Ieuan Walker
68e1a87ba2 Update readme badges 2019-07-15 11:16:53 +01:00
Ieuan Walker
1a3f56e523 Merge pull request #1 from codacy-badger/codacy-badge
Add a Codacy badge to README.md
2019-07-15 11:12:55 +01:00
Ieuan Walker
c6108f8ed4 update readme 2019-07-15 11:12:09 +01:00
The Codacy Badger
b9408c65ad Add Codacy badge 2019-07-15 10:11:44 +00:00
Ieuan Walker
e2d163487a Update azure-pipelines.yml for Azure Pipelines 2019-07-15 10:48:41 +01:00
Ieuan Walker
f5224da0d4 updated NuGet description 2019-07-13 12:23:45 +01:00
Ieuan Walker
1a87864309 Added nuget package link 2019-07-13 03:28:22 +01:00
Ieuan Walker
267c9f082b updated license 2019-07-13 02:56:35 +01:00
Ieuan Walker
0af6e85eec updated version 2019-07-13 02:50:07 +01:00
Ieuan Walker
555f30fb50 Update azure-pipelines.yml for Azure Pipelines - Fixed project path 2019-07-13 02:41:36 +01:00
Ieuan Walker
669778c213 pipline file moved 2019-07-13 02:38:08 +01:00
Ieuan Walker
a842b2a152 Set up CI with Azure Pipelines
[skip ci]
2019-07-13 02:35:26 +01:00
Ieuan Walker
41e30386f0 Merge branch 'master' of https://github.com/IeuanWalker/GeoUK 2019-07-13 02:32:11 +01:00
Ieuan Walker
fe969e875b update readme with build status 2019-07-13 02:31:59 +01:00
Ieuan Walker
cad0832d5c Update azure-pipelines.yml for Azure Pipelines 2019-07-13 02:26:47 +01:00
Ieuan Walker
e0047ad2f5 Update azure-pipelines.yml for Azure Pipelines 2019-07-13 02:24:46 +01:00