Skip to content

Add FromLatitudeLongitude to EastingNorthing class - #60

Merged
IeuanWalker merged 1 commit into
masterfrom
FromLatitudeLongitude
Feb 18, 2026
Merged

Add FromLatitudeLongitude to EastingNorthing class#60
IeuanWalker merged 1 commit into
masterfrom
FromLatitudeLongitude

Conversation

@IeuanWalker

Copy link
Copy Markdown
Owner

No description provided.

Introduced a static method to create EastingNorthing objects from latitude and longitude by converting WGS84 coordinates to OSGB36 and projecting to British National Grid. Added necessary using directives for GeoUK.Ellipsoids and GeoUK.Projections.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a static factory method FromLatitudeLongitude to the EastingNorthing class, enabling conversion from WGS84 latitude/longitude coordinates to British National Grid easting/northing coordinates. This provides a convenient inverse operation to the existing FromEastingNorthing method in the LatitudeLongitude class.

Changes:

  • Added FromLatitudeLongitude static method to EastingNorthing class for converting WGS84 lat/lng to BNG coordinates
  • Added required using directives for GeoUK.Ellipsoids and GeoUK.Projections

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +72 to +74
/// <param name="latitude"></param>
/// <param name="longitude"></param>
/// <returns></returns>

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter documentation is missing descriptions. The similar method FromEastingNorthing in LatitudeLongitude.cs provides descriptive parameter documentation (lines 83-84) that explains the parameter meaning and units. For consistency and API clarity, please add descriptions for the latitude and longitude parameters, including their expected units (degrees) and any range constraints if applicable.

Suggested change
/// <param name="latitude"></param>
/// <param name="longitude"></param>
/// <returns></returns>
/// <param name="latitude">
/// The geodetic latitude in degrees, positive north of the equator; typically in the range -90 to 90.
/// </param>
/// <param name="longitude">
/// The geodetic longitude in degrees, positive east of the Prime Meridian; typically in the range -180 to 180.
/// </param>
/// <returns>
/// A new <see cref="EastingNorthing"/> representing the projected British National Grid coordinates
/// corresponding to the specified latitude and longitude.
/// </returns>

Copilot uses AI. Check for mistakes.
Comment thread GeoUK/Coordinates/EastingNorthing.cs
@IeuanWalker
IeuanWalker merged commit 478adc5 into master Feb 18, 2026
7 checks passed
@IeuanWalker
IeuanWalker deleted the FromLatitudeLongitude branch February 18, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants