Skip to content

Undefined EPSG Code can give a ValueError in MSUI #1536

@ReimarBauer

Description

@ReimarBauer

Because users can enter EPSG Codes into the msui_settings.json there could been added values which are not supported.
We should catch this early, in the config editor, on msui start.

e.g.

 "06 Europe (stereo)": {
            "CRS": "EPSG:777400101",
            "map": {
                "llcrnrlon": -20.0,
                "llcrnrlat": 35.0,
                "urcrnrlon": 40.0,
                "urcrnrlat": 70.0
            }
Fatal error in MSS 7.0.2. on Linux-5.4.0-124-generic-x86_64-with-glibc2.27
Python 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:38:57) [GCC 10.3.0]

Please report bugs in MSS to https://github.com/Open-MSS/MSS

Information about the fatal error:

Traceback (most recent call last):
  File "/home/reimar/PycharmProjects/MSS/mslib/msui/topview.py", line 317, in changeMapSection
    proj_params = get_projection_params(current_map["CRS"])
  File "/home/reimar/PycharmProjects/MSS/mslib/utils/coordinate.py", line 188, in get_projection_params
    raise ValueError("EPSG code not supported by basemap module: '%s'", proj)
ValueError: ("EPSG code not supported by basemap module: '%s'", 'epsg:777400101')

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmsui

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions