Skip to content
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

r.in.wms: fix get region extent for WMS query, if location is 'XY location (unprojected)' #853

Merged
merged 2 commits into from
May 2, 2024

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Jul 30, 2020

To Reproduce

  1. Create Location with XY coordinate system (not projected)
  2. Launch grass79 --gui
  3. Launch Add web service layer dialog
  4. Add some layer from http://ows.mundialis.de/services/service? (OpenStreetMap WMS - by terrestris layer)
  5. Check error message in the emulator terminal

Error message:

Traceback (most recent call last):
  File "/usr/lib64/grass79/scripts/m.proj", line 292, in <module>
    main()
  File "/usr/lib64/grass79/scripts/m.proj", line 164, in main
    if "XY location" in kv['+proj'] and (ll_in or ll_out):
KeyError: '+proj'
Traceback (most recent call last):
  File "/usr/lib64/grass79/gui/scripts/d.wms", line 214, in <module>
    sys.exit(main())
  File "/usr/lib64/grass79/gui/scripts/d.wms", line 207, in main
    temp_map = wms.GetMap(options, flags)
  File "/usr/lib64/grass79/etc/r.in.wms/wms_base.py", line 212, in GetMap
    self.bbox = self._computeBbox()
  File "/usr/lib64/grass79/etc/r.in.wms/wms_base.py", line 335, in _computeBbox
    quiet=True)  # TODO: stdin
  File "/usr/lib64/grass79/etc/python/grass/script/core.py", line 566, in read_command
    return handle_errors(returncode, stdout, args, kwargs)
  File "/usr/lib64/grass79/etc/python/grass/script/core.py", line 394, in handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run m.proj m.proj --q -d proj_out=+proj=longlat +no_defs +a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000 +type=crs  proj_in=XY location (unprojected) input=/home/tomas/grassdata/xy/PERMANENT/.tmp/gentoo-gnu-linux/16034.0 ended with error
Process ended with non-zero return code 1. See errors in the (error) output.

@tmszi tmszi added bug Something isn't working GUI wxGUI related labels Aug 19, 2020
@neteler
Copy link
Member

neteler commented May 8, 2021

To Reproduce

1. Create Location with XY coordinate system (not projected)

2. Launch `grass79 --gui`

2a: Select/create XY location

3. Launch Add web service layer dialog

4. Add some layer from `http://ows.mundialis.de/services/service?` (OpenStreetMap WMS - by terrestris layer)

5. Check error message in the emulator terminal

Error message:

I tried this today and no error messages appeared.
Of course also no map while it is listed in the "Display" tab.

Perhaps it would be enough to catch "XY location" and open a message that this won't work?

@tmszi
Copy link
Member Author

tmszi commented May 9, 2021

To Reproduce

1. Create Location with XY coordinate system (not projected)

2. Launch `grass79 --gui`

2a: Select/create XY location

3. Launch Add web service layer dialog

4. Add some layer from `http://ows.mundialis.de/services/service?` (OpenStreetMap WMS - by terrestris layer)

5. Check error message in the emulator terminal

Error message:

I tried this today and no error messages appeared.
Of course also no map while it is listed in the "Display" tab.

Perhaps it would be enough to catch "XY location" and open a message that this won't work?

This is very interesting, I recompiled GRASS 7.9 with the latest code, and the error still shows up.

r_in_wms

GRASS xy/PERMANENT:~ > g.version -g
version=7.9.dev
date=2021
revision=96a65e10f
build_date=2021-05-09
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8

@neteler neteler added this to the 8.0.1 milestone Dec 9, 2021
@ninsbl
Copy link
Member

ninsbl commented Feb 20, 2022

Bumping up milestone as 8.0.1 is due in two days, while this has not been part of RC1 and there has not been activity for some time.

@ninsbl ninsbl modified the milestones: 8.0.1, 8.0.2 Feb 20, 2022
@wenzeslaus wenzeslaus modified the milestones: 8.0.2, 8.4.0 Mar 16, 2022
@wenzeslaus wenzeslaus modified the milestones: 8.3.0, 8.3.1 Feb 10, 2023
@tmszi tmszi force-pushed the fix_wxgui_web_service_xy_loc branch from beeff97 to 951a41b Compare September 27, 2023 11:19
@tmszi tmszi modified the milestones: 8.3.1, 8.4.0 Sep 29, 2023
@echoix echoix force-pushed the fix_wxgui_web_service_xy_loc branch from a8a4863 to eff9058 Compare April 16, 2024 20:56
@github-actions github-actions bot added raster Related to raster data processing Python Related code is in Python module misc labels Apr 16, 2024
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

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

I think this can be merged for now, but there should be a better solution for GUI to inform users.

@petrasovaa petrasovaa merged commit 55b34ae into OSGeo:main May 2, 2024
26 checks passed
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related misc module Python Related code is in Python raster Related to raster data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants