Add FromLatitudeLongitude to EastingNorthing class - #60
Conversation
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.
There was a problem hiding this comment.
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
FromLatitudeLongitudestatic method toEastingNorthingclass for converting WGS84 lat/lng to BNG coordinates - Added required using directives for
GeoUK.EllipsoidsandGeoUK.Projections
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// <param name="latitude"></param> | ||
| /// <param name="longitude"></param> | ||
| /// <returns></returns> |
There was a problem hiding this comment.
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.
| /// <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> |
No description provided.