r.in.nasadem + r.in.srtm.region: fix PROJ parsing#500
Merged
neteler merged 3 commits intoOSGeo:masterfrom Apr 14, 2021
neteler:r_in_nasadem_srtm_proj_fix
Merged
r.in.nasadem + r.in.srtm.region: fix PROJ parsing#500neteler merged 3 commits intoOSGeo:masterfrom neteler:r_in_nasadem_srtm_proj_fix
neteler merged 3 commits intoOSGeo:masterfrom
neteler:r_in_nasadem_srtm_proj_fix
Conversation
Due to OSGeo/grass#1240 the output structure of `g.proj -g` changed, leading to ``` r.in.nasadem user='neteler' password='XXXXXXXXX' output=nasadem resolution=30 Traceback (most recent call last): File "/home/mundialis/.grass7/addons/scripts/r.in.nasadem", line 631, in <module> main() File "/home/mundialis/.grass7/addons/scripts/r.in.nasadem", line 475, in main SRCGISRC, TMPLOC = createTMPlocation() File "/home/mundialis/.grass7/addons/scripts/r.in.nasadem", line 342, in createTMPlocation if grass.parse_command('g.proj', flags='g')['EPSG'] != str(epsg): KeyError: 'EPSG' ERROR: Region <r_in_nasadem_region_409609> not found Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/home/mundialis/.grass7/addons/scripts/r.in.nasadem", line 312, in cleanup grass.run_command("g.region", region=tmpregionname) File "/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 441, in run_command return handle_errors(returncode, returncode, args, kwargs) File "/home/mundialis/software/grass78_git/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 342, in handle_errors raise CalledModuleError(module=None, code=code, grass.exceptions.CalledModuleError: Module run None g.region region=r_in_nasadem_region_409609 ended with error Process ended with non-zero return code 1. See errors in the (error) output. ``` The change is the introduction of `srid`: ``` {'name': 'WGS 84', 'datum': 'wgs84', 'ellps': 'wgs84', 'proj': 'll', 'no_defs': 'defined', 'srid': 'EPSG:4326', 'unit': 'degree', 'units': 'degrees', 'meters': '1.0'} ``` which is addressed by this PR (feedback concerning the Python style is welcome). Fixes - r.in.nasadem - r.in.srtm.region (perhaps other addons are affected as well)
griembauer
reviewed
Apr 6, 2021
Co-authored-by: Guido Riembauer <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Due to OSGeo/grass#1240 the output structure of
g.proj -ghas changed, leading toKeyError: 'EPSG':Reason: the recent PROJ updates introduced
sridin the output ofg.proj -g:This PR addresses the needed parsing change (feedback concerning the Python style is welcome).
Fixes
(perhaps other addons are affected as well)