Skip to content

Conversation

@saket0187
Copy link
Contributor

Fixes #5467

Problem Description

When creating a UTM location using "Define custom CRS" method and selecting "No" for "Southern Hemisphere?", the wizard incorrectly adds the +south parameter to the PROJ.4 definition, resulting in a southern hemisphere projection instead of northern.

Root Cause

Line 905 in gui/wxpython/location_wizard/wizard.py:
if param["value"] is False:

The code used is False to check the parameter value, but wx.Choice widget returns integer 0 for "No" selection, not boolean False. The is operator checks object identity, not value equality, so the condition fails and the +south parameter gets added incorrectly.

Solution

Changed the condition to:
if param["value"] == 0 or param["value"] is False:

Testing

  • Compiled and tested on WSL Ubuntu 24.04
  • Verified fix with both original buggy code and patched version

Before Fix

Screenshot 2025-12-27 144454

After Fix

Screenshot 2025-12-26 215900

@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Dec 27, 2025
@echoix echoix merged commit 7a41ee3 into OSGeo:main Dec 28, 2025
27 checks passed
@github-actions github-actions bot added this to the 8.5.0 milestone Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GUI wxGUI related Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants