[GRASS-user] Processing Geotiff files from Cropspace

Pedro Camargo veigacamargo at gmail.com
Fri Aug 17 11:39:52 PDT 2012


I finally got the processing of the geotiffs from
http://nassgeodata.gmu.edu/CropScape/ to work properly and was advised to
report it here so others can follow if they want to.

The objective of this processing was to  compute statistics (number of
pixels of each value/category) for each area I’m interested in (Areas
equivalent to Counties in the whole Country) anf for which I had a vector
layer (shapefile) prepared.


Thanks to the help of Micha Silver, I got to the final procedure used and
here it is:

1.       Downloaded the raster image from Cropspace (WGS84/Lag/long)

2.       Imported  the raster image into GRASS

3.       Imported the area vector layer from a Shape file

4.       Added centroids to the shape file (v.centroids)

5.       Converted the vector layer into raster (v.to.rast using attr as
values)

6.       Computed statistics for my raster layers using r.stats -c -a
(gives me a table with the sums of each combination of values in both
layers.  Filtering this database for each value found in the area layer, I
have the statistics about the crop layer for each one of my areas



It worked beautifully, and the next step is to generate a batch/script file
to extend the analysis to the whole country and multiple years (probably
using Python, which I used before, or a DOS batch).



Thanks to Micha again,

Pedro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120817/c4ae78ff/attachment.html>


More information about the grass-user mailing list