Tag Archives: command line

Extracting lines ending with specific character using sed or grep

A quick note (to myself mostly) about how to extract lines from a text file that end with a specific set of characters. In Linux, you can very easily do this using ‘grep’ or ‘sed’. But, first a little bit of background. Continue reading

Add geometry values to vector layer in GRASS GIS

In my previous post I explained how to add geometry values to the attribute table of a vector map in QGIS. You can do the same in GRASS GIS. It is slightly more complicated (don’t worry, it is still easy enough), but also more powerful. Below I will briefly explain how to use this tool using the GUI or command line. Continue reading

Start R inside GRASS but keep the terminal prompt

I often run R from within GRASS GIS. For example using R as a scripting language to automate GIS analysis. Or to use statistical models in R on spatial data in GRASS.

I used to open R in the terminal. However, I am using more and more RStudio instead. This has one drawback. When opening RStudio in the terminal (or any other program for that matter), you cannot use that command prompt anymore. Continue reading

Creating a map using the command line

Although I like to carry out GIS analyses using the command line interface (CLI), creating maps is something I still tend to do using the graphical interface (GUI). And most of the time that makes perfect sense to me, creating something visual (the map), using visual tools (GRASS GUI gis.m or QGIS).

But things change when e.g., you have to create many maps of the same area changing one variable only, Continue reading