-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
wxGUI AddWSDialog: Fix render WMTS layer with OGC:CRS84 coor system #674
wxGUI AddWSDialog: Fix render WMTS layer with OGC:CRS84 coor system #674
Conversation
Thanks for your fix. I just saw (maybe it can be ignored), that the change fails on Ubuntu16.04:
|
The f strings are coming with Python 3.6, Ubuntu 16 has Python 3.5. So far we have been using 3.5 as minimum version. We could discuss changing it to 3.6 (on dev list perhaps), for grass 8 we could definitely go with 3.6, but maybe not for 7.8 series. So @tmszi please change it to python 3.5 compatible syntax, thank you! |
4fb4102
to
00ca4c8
Compare
You're welcome. All right, I fixed it. |
The layer is still not showed, I suspect that's a different problem, but could you please confirm that it's unrelated to this? Also could you please provide little bit more context to this fix? |
gui/wxpython/web_services/widgets.py
Outdated
@@ -709,7 +710,13 @@ def CreateCmd(self): | |||
|
|||
if 'srs' not in self.drv_props['ignored_params']: | |||
i_srs = self.params['srs'].GetSelection() | |||
epsg_num = int(self.projs_list[i_srs].split(':')[-1]) | |||
try: | |||
int(self.projs_list[i_srs].split(':')[-1]) |
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.
This line seems to be redundant?
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.
Yes it is. All right, I fixed it.
00ca4c8
to
92f67a2
Compare
I try test render NASA Columnar Cloud Liquid Water (Night, AMSR2, GCOM-W1) layer. Did you get an error message? NASA Surface Rain Rate (Day, AMSR2, GCOM-W1) layer: |
5a230ff
to
92f67a2
Compare
Hm, can't reproduce it, I am getting the image now. |
gui/wxpython/web_services/widgets.py
Outdated
@@ -709,7 +710,9 @@ def CreateCmd(self): | |||
|
|||
if 'srs' not in self.drv_props['ignored_params']: | |||
i_srs = self.params['srs'].GetSelection() | |||
epsg_num = int(self.projs_list[i_srs].split(':')[-1]) | |||
srs = self.projs_list[i_srs].split(':')[-1] | |||
epsg_num = int(''.join(re.findall('\d+', srs))) |
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.
Hopefully last small request, could you please use raw string for the expression? Quoting from Python doc:
This is complicated and hard to understand, so it’s highly recommended that you use raw strings for all but the simplest expressions.
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.
Yes of course, I fixed it.
92f67a2
to
a3c68e9
Compare
To reproduce:
Default behavior:
Missing source projection (Chooice widget items) for every layer in the list
Expected behavior:
Chooice source projection widget has correct source projection item OGC:CRS84