[GRASS-user] Vector map attributes

Markus Metz 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 
>> results:
>>> v.category in=MT_San_clean opt=print
>> 1331/566/571/691/1332/456/416/410/405/561/390
>> 1294/1249/1265/1229/1225/1273/1233
>> 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.

Markus M

More information about the grass-user mailing list