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

g.proj use project instead of location since 8.4.x #36

Open
vbrunn opened this issue Oct 15, 2024 · 0 comments
Open

g.proj use project instead of location since 8.4.x #36

vbrunn opened this issue Oct 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@vbrunn
Copy link

vbrunn commented Oct 15, 2024

Keyword "location" should be changed to "project" depending on grass version

"g.proj", flags="c", location=tmp_loc, quiet=True, **epsg_arg
to avoid warning:
WARNUNG: Please update the usage of <g.proj>: option <location> has been renamed to <project>
Solution approach similar to

    grass_version = [int(item) for item in grass_version_info.split('.')[:2]]
    if grass_version >= [8, 4]:
        loc_proj = "project"
    else:
        loc_proj = "location"

    v_kwargs = {"mapset": mapset,
            "input": aoi_map_to_set_region1,
            "output": aoi_map_to_set_region1,
            "quiet": True,
            loc_proj: loc,
            }
    grass.run_command(
        "v.proj",
        **v_kwargs
    )```
@vbrunn vbrunn added the enhancement New feature or request label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant