[GRASS-dev] Python: core.create_location() available but core.create_mapset() yet missing
Glynn Clements
glynn at gclements.plus.com
Tue May 6 13:21:49 PDT 2014
Markus Neteler wrote:
> > This would help folks who want to batch-process data and appears to be
> > the missing piece to completely generate a new location in the Python
> > way.
>
> Is it possible, that create_location() only works *within* a GRASS session?
If you're not within a GRASS session, I wouldn't assume that Python
can even find the grass.script.core package. Or the libraries, or
modules, or anything else.
> How would I generate a location in Python when not having the location
> yet created but only a SHAPE/.prj file available or a GeoTIFF?
> Seems I am overlooking something. Pointers welcome!
IMHO, the logical approach is to start a GRASS session with a dummy
database, location and mapset, create the new database, location
and/or mapset, then switch to it with g.mapset.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list