from grass.pygrass.gis import Gisdbase gisdb = Gisdbase() gisdb.name gisdb.locations() from grass.pygrass.gis import Location Location() gisdb['loc_ncarolina_spm_base0.3.1'] northc = gisdb['loc_ncarolina_spm_base0.3.1'] northc.gisdbase northc.name northc.mapsets() from grass.pygrass.gis import Mapset Mapset() northc['user1'] # fails for simlink (on the live PERMANENT is a simlink to a different directory) # #permanent = northc['PERMANENT'] northc = northc['user1'] northc.gisdbase northc.location northc.name northc.glist('raster') %timeit Mapset('user1').glist('raster') from grass.script import core as gcore gcore.list_grouped('rast')['user1'] %timeit gcore.list_grouped('rast')['user1'] Mapset('user1').glist('raster', pattern='el*') from grass.pygrass.gis.region import Region reg = Region() reg reg.items() reg.north reg.ewres reg.get_bbox() #!g.region --help # the following fails (traceback attached below) with Region(nsres=100., ewres=100.) as region: print(region.items()) print(Region().items()) Region.nsres=100. Region.ewres=100. Region() from grass.pygrass.vector.basic import Bbox from grass.pygrass.vector.geometry import Point bbox = Bbox() bbox bbox.north = 10 bbox.east = 10 point = Point(5, 5) bbox.contains(point)