-
Notifications
You must be signed in to change notification settings - Fork 414
Correct geodetic scale denominator calculation #3828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Correct geodetic scale denominator calculation #3828
Conversation
|
Can you clear your pull request by doing an interactive rebase and removing all the extra commits? |
b2be240 to
4e511ee
Compare
|
Hi! As requested, I've cleaned up the PR history using an interactive rebase. It should now contain only the relevant commit on top of the latest master. Ready for review again. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebr72 does it look good to you?
|
Yes, thank you. |
|
@sbrunner @fdiazcarsi |
sebr72
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general practice, we always add tests when making changes. But in this case in particular (as it appears to be a very old bug - and sometimes they are not), please create at least a Unit test if CI test is not required: Your decision
This commit fixes a bug in the
getGeodeticDenominatormethod within theScaleclass.Problem:
The calculation for
minGeoX, which defines the starting X-coordinate of the horizontal line segment used for geodetic distance measurement, incorrectly usedposition.yinstead ofposition.x. This resulted in the geodetic calculation being performed at an incorrect location on the map, leading to an inaccurate scale denominator.Fix:
The
minGeoXcalculation has been corrected to useposition.x - (geoWidth / 2.0), ensuring that the horizontal line segment is properly centered around the providedposition's X-coordinate.Impact:
This fix ensures that geodetic scale denominators are calculated accurately, improving the precision of map rendering and scale representation, especially for projections where geodetic corrections are critical.