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.
A nice example is given in a post by Darren Cope about using OGR for clipping GIS data files. Using the ogr2ogr function, it only takes one line to clip a (potentially very large) vector polygon file with another vector layer.
And what makes this even better, you don’t have to choose between the two tools. Just combine them in your script
