Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/java/org/mapfish/print/map/Scale.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public double getGeodeticDenominator(
double width = 1;
double geoWidthInches = getResolutionInInches() * width;
double geoWidth = DistanceUnit.IN.convertTo(geoWidthInches, this.unit);
double minGeoX = position.y - (geoWidth / 2.0);
double minGeoX = position.x - (geoWidth / 2.0);
double maxGeoX = minGeoX + geoWidth;
Comment on lines 201 to 205
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This bug fix changes geodetic denominator behavior but there’s no regression test to prevent reintroducing the X/Y mix-up. Consider adding a unit test that calls getGeodeticDenominator() with a projection where distortion varies with easting (so swapping position.x and position.y would change the result), e.g., using CH1903 (EPSG:21781) with a coordinate where x != y and asserting the expected denominator.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback


final GeodeticCalculator calculator = new GeodeticCalculator(projection);
Expand Down
Loading