Re: Issue with addon r.vif in MS Windows GUI installations (stand-alone v. 7.2.2 and 7.0.5)

Helmut Kudrnovsky <[email protected]>
Newsgroups gmane.comp.gis.grass.user
Message-ID <[email protected]>
>Any idea how I can do that in such a way that it works on both Linux and
Windows?

in r.vif script I've changed the relevant lines:

<----------------------------------------
    # Get the raster values at sample points
    fd, tmpcov = tempfile.mkstemp()
    with open(tmpcov, "w") as text_file:
        text_file.write(
                gs.read_command("r.stats", flags="1n", input=raster,
                                quiet=True, separator="comma"))
    p = np.loadtxt(tmpcov, skiprows=0, delimiter=",")

    # Clean up
    text_file.close()
    os.close(fd)
    os.remove(tmpcov)
    if not n == "100%":
        gs.run_command("r.mask", flags="r", quiet=True)
        if exist_mask['fullname']:
            gs.run_command("g.rename", raster=[mask_backup, "MASK"],
                           quiet=True)
    return(p)
---------------------------------------->

and tested the script in winGRASS; it seems to work in windows; not tested
on linux and mac.




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.