[GRASS-user] python parse_command
peter.zamb at gmail.com
Mon Feb 12 06:35:28 PST 2018
the error is due to grass_session that is not creating the location if
I don't have time in this day to fix this issue in grass_session, so the
fastest fsolution at the momenth is to check and create what is needed step
I did not have xyz file to test so I've only execute g.gisenv and it works,
let me know if it works also with r.inxyz:
from __future__ import print_function
from grass_session import Session
from grass.script import core as gcore
GISDBASE = "/tmp/grassdata"
LOCATION = "nrw"
EPSG = "EPSG:4326"
if not os.path.exists(GISDBASE):
if not os.path.exists(os.path.join(GISDBASE, LOCATION)):
with Session(gisdb=GISDBASE, location=LOCATION,
print("Created a new location!")
print("Location already exist!")
with Session(gisdb=GISDBASE, location=LOCATION, mapset="elevation",
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user