Tag Archives: command line tool

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

Using OGR

One of the reasons I like GRASS GIS is that everything can be done at the command line. Of course there are other ways to do this, and one which I want to explore a bit more is the OGR library. GRASS GIS uses the OGR library under the hood, but using OGR directly offers additional flexibility. For example, using OGR allows you to work directly on shapefiles, without having to import them in the GRASS database first. Continue reading

Accessing your file system from within R

R includes some powerful yet easy to use functions that provide a direct interface to the computer’s file system. In the example below I use two of these functions (file.info and file.copy) to copy a random selection of the songs on my computer to my mp3 player, while making sure that the combined size of these files does not exceed 500MB. Continue reading