Last week I was looking at some slides from a lecture here at university. One slide caught my attention more than others, it was a map with some pie charts representing the distribution of different vegetal species in quadrats of an archaeological sites. Quite common and ordinary stuff in publications, indeed.

The resulting thematic map with pie charts

The first question rising to my mind was: how do I do this in GRASS?. It turned out that there wasn’t a module to automagically count the number of points within an area, and generate a report that keeps also information about the distribution of different classes. The chart stuff is already available since GRASS 6.0 and before, but I needed a module that could generate data from which I could plot charts.

Thanks to Giovanni Allegri, Markus Neteler I could end up with a bash script that does all this quite well, even though a bit slowly. Hamish Bowman helped a lot pointing out some unsafe pieces of code and helping for a faster code. v.count.points.sh is now the first of a series of tutorials about spatial analysis (this being a very simple form of analysis) for archaeology on the Quantitative Archaeology wiki.

Check out the script page on the wiki and let me know if you find errors. Patches are welcome!


Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.