[GRASS-dev] What is considered as valid location and valid mapset

Vaclav Petras wenzeslaus at gmail.com
Tue Sep 13 12:53:51 PDT 2016


Hi all,

I wonder what is a valid location and what is a valid mapset. The
lib/init/grass.py file says:

def is_mapset_valid(full_mapset):
    return os.access(os.path.join(full_mapset, "WIND"), os.R_OK)

def is_location_valid(gisdbase, location):
    return os.access(os.path.join(gisdbase, location, "PERMANENT",
"DEFAULT_WIND"), os.F_OK)

This is what I've done based on the code which was there before
refactoring. I wonder if it is correct. If I need to switch to a mapset, I
want the region to be editable, so I need os.W_OK in that case. On the
other hand, is WIND file needed? Isn't it created automatically from
DEFAULT_WIND?

And further, is DEFAULT_WIND the right requirement for a valid PERMANENT
mapset? Are some PROJ_* files needed?

Thanks,
Vaclav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20160913/d245109b/attachment.html>


More information about the grass-dev mailing list