grass.app package

Submodules

grass.app.data module

Provides functions for the main GRASS GIS executable

  1. 2020 by Vaclav Petras and the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

This is not a stable part of the API. Use at your own risk.

grass.app.data.create_database_directory()[source]

Creates the standard GRASS GIS directory. Creates database directory named grassdata in the standard location according to the platform.

Returns the new path as a string or None if nothing was found or created.

grass.app.data.create_startup_location_in_grassdb(grassdatabase, startup_location_name)[source]

Create a new startup location in the given GRASS database.

Returns True if a new startup location successfully created in the given GRASS database. Returns False if there is no location to copy in the installation or copying failed.

grass.app.data.ensure_default_data_hierarchy()[source]

Ensure that default gisdbase, location and mapset exist. Creates database directory based on the default path determined according to OS if needed. Creates location if needed.

Returns the db, loc, mapset, mapset_path

grass.app.data.get_possible_database_path()[source]

Looks for directory ‘grassdata’ (case-insensitive) in standard locations to detect existing GRASS Database.

Returns the path as a string or None if nothing was found.