Cheat sheet

Cheat sheet#

In programming or scripting, cheat sheets are collections of commands which are frequently used. In order to avoid having to look them up every time, it is advisable to collect them in a document for quick reference.

Command

Purpose

Print the current mapset

List all existing mapsets

Change the mapset

Create a new mapset

List all vector layers in the current mapset

List all raster layers in the current mapset

g.region -p

Print the current region

Set the current region to match a given vector layer

Set the current region to match a given raster layer

Import a vector data set with on-the-fly reprojection

Import a vector data set without on-the-fly reprojection

Import a raster data set with on-the-fly reprojection

Import a raster data set without on-the-fly reprojection

Export a raster data set to GeoTIFF

Export a vector data set to geopackage

Delete a vector layer

Delete a raster layer

Buffer a vector layer

Clip a vector layer with another one

Intersect two vector layers

Dissolve features based on a certain column value

Create a new column in the attribute table of a vector layer

Calculate the sum of two columns and store result in the attribute table