[GRASS-user] GRASS63cvs v.rast.stats reports zero for many
CATs
Brandon M. Gabler
bgabler at email.arizona.edu
Fri Apr 6 18:48:35 EDT 2007
Thanks Dylan, I will check out starspan for future work!
Also, there were no null cells, at least in the vicinity of the vectors
that had
reported zeros. So I suspect that is not the issue. I don't know if
that changes
anything, but such is life.
Thanks again,
Brandon
--
Brandon M. Gabler
Research Associate
Department of Anthropology
1009 E South Campus Drive, Building #30A
University of Arizona
Tucson, AZ 85721
Phone: 520-621-8455
Fax: 520-621-2088
Quoting Dylan Beaudette <dylan.beaudette at gmail.com>:
> On Friday 06 April 2007 13:36, Brandon M. Gabler wrote:
>> Fellow GRASSers -
>>
>> I am using GRASS 6.3 cvs, the Kynge's build, and I have an issue
>> using v.rast.stats on a raster of slope. Many (n>100) of my
>> archaeological sites, which are all polygons, produced 9 columns of
>> zeros for the slope stat calculations. I repeated the exercise, using
>> different column names, and it repeated the results.
>>
>> The oddest part is that I successfully calculated elevation stats
>> from a DEM raster using the same v.rast.stats command. The slope
>> raster was produced directly from the DEM, so resolution, etc. are
>> exactly the same.
>
> Hi,
>
> r.slope.aspect will create maps with null-cells in some cases- this is a
> feature not a bug, see the manual page. Perhaps the input DEM did not have
> any null cells at these areas, and thus had good results from the trouble
> areas...
>
>> I investigated some of the polys that were missing slope information,
>> and indeed, the raster is completely intact in the area of these
>> polygons, with values other than zero, and the polygon itself is clean.
>
> were there any null cells?
>
>> In attempting to do the same calculations with my aspect raster,
>> there were also many sites where the aspect calculation resulted in 0
>> (for both of these, even the 'n' field, number of cells, is 0). These
>> sites were not always the same as the ones that had slope
>> calculations of zeros!
>>
>> I am running the stat calculations with slope again, after cleaning
>> the vector file, but I still am not optimistic that this will help
>> since my v.rast.stats calculations on elevation were successful where
>> the slope ones were not.
>>
>> Also, it takes about 7 hours to calculate the stats for my 893
>> polygons (16 meter grid resolution probably has something to do with
>> it, but wanted to make sure this isn't a fixable thing).
>
> While there are some solutions to the general problem of 'zonal
> statistics' in
> GRASS, I tend to use the 'starspan' application for these operations. It is
> VERY fast, and has been used in numerous papers. It can directly read GRASS
> raster and vector data, which is a definite plus.
>
> google starspan for some ideas. also- matt perry's blog has some
> examples if I
> am not mistaken.
>
> cheers,
>
> --
> Dylan Beaudette
> Soils and Biogeochemistry Graduate Group
> University of California at Davis
> 530.754.7341
More information about the grass-user
mailing list