[GRASS-user] Vector map attributes
markus.metz.giswork at googlemail.com
Wed Mar 25 15:25:53 EDT 2009
Moritz Lennert wrote:
> On 25/03/09 11:05, Craig Leat wrote:
>> v.info reports 7296 features for the
>> cleaned map. I now wish to count the number of latrines in each place,
>> so I ran:
>>> echo "SELECT *,count(Area) FROM MT_San_clean GROUP BY Area" | db.select
>> and get a total of 10537, so the results are bogus.
>> Running the following command I can see the reason for the bogus
>>> v.category in=MT_San_clean opt=print
>> v.edit has assigned multiple categories to points when they were snapped.
For these two examples, maybe you get meaningful results if there is
either one point with several categories or several points with one
category each, but not both. I'm not sure what v.edit did, but it is
possible that you now have several points with identical coordinates and
all points have several, identical categories.
> Or v.clean tool=rmdupl (although the man page says "pay attention to
> categories!" - don't know what that means).
I think it means that you don't have control over what is kept and what
is deleted. If you have e.g. two points with identical coordinates but
different categories assigned, there is no way to influence what point
will be deleted, i.e. what category is deleted, thus what associated
information in the respective attribute table is no longer accessible
because there is no longer a point with the category that was just
deleted. Clumsy phrasing, I hope you understand what I mean.
More information about the grass-user