After some frustration with the GRASS-R functionality as implemented
via temp shapefiles, I realized that the source of the problem was
features missing cat values.
I poked around with v.edit, but did not see any simple way to ID or
remove features missing a cat value. The '-c' option in v.out.ogr was
a temporary fix, but I would like to be able to identify / remove
cat-less features without using v.out.ogr .
Any tips on how to do this / or where work would need to be done?
After some frustration with the GRASS-R functionality as implemented
via temp shapefiles, I realized that the source of the problem was
features missing cat values.
I poked around with v.edit, but did not see any simple way to ID or
remove features missing a cat value. The '-c' option in v.out.ogr was
a temporary fix, but I would like to be able to identify / remove
cat-less features without using v.out.ogr .
to extract only features with category number using v.extract should work(?)
v.extract in=r out=rc list=1-9999
or
v.edit map=r cats=1-9999 tool=select
resp.
v.edit map=r cats=1-9999 tool=select -r
Martin
Any tips on how to do this / or where work would need to be done?
After some frustration with the GRASS-R functionality as implemented
via temp shapefiles, I realized that the source of the problem was
features missing cat values.
I've just added a note about this to vectorintro.html as it is
an unobvious feature of GRASS vector processing.
I poked around with v.edit, but did not see any simple way to ID or
remove features missing a cat value. The '-c' option in v.out.ogr was
a temporary fix, but I would like to be able to identify / remove
cat-less features without using v.out.ogr .
Any tips on how to do this / or where work would need to be done?
to add category numbers use v.category or v.centroids.
you might give all newly categorized features a cat number of 99999
(cat=99999 step=0) then extract those to another map with v.extract
and compare.
Dylan Beaudette wrote:
> After some frustration with the GRASS-R functionality as implemented
> via temp shapefiles, I realized that the source of the problem was
> features missing cat values.
I've just added a note about this to vectorintro.html as it is
an unobvious feature of GRASS vector processing.
Great. It turned out that the problems I was experiencing were related to 2
things:
1. broken topology
2. areas without a centroid.
manual edits with v.digit fixed the first problem and v.category type=area
option=add fixed the second.
Just goes to show that garbage in = garbage out.
> I poked around with v.edit, but did not see any simple way to ID or
> remove features missing a cat value. The '-c' option in v.out.ogr was
> a temporary fix, but I would like to be able to identify / remove
> cat-less features without using v.out.ogr .
>
> Any tips on how to do this / or where work would need to be done?
to add category numbers use v.category or v.centroids.
you might give all newly categorized features a cat number of 99999
(cat=99999 step=0) then extract those to another map with v.extract
and compare.
It might be a good idea in the manual to define the behavior of v.category,
when the input has features with and without centroids, and when the
option=add... It seems like it ignores all existing centroids, and adds to
areas which were previously missing them ?
2007/10/8, Dylan Beaudette <dylan.beaudette@gmail.com>:
> After some frustration with the GRASS-R functionality as implemented
> via temp shapefiles, I realized that the source of the problem was
> features missing cat values.
>
> I poked around with v.edit, but did not see any simple way to ID or
> remove features missing a cat value. The '-c' option in v.out.ogr was
> a temporary fix, but I would like to be able to identify / remove
> cat-less features without using v.out.ogr .
to extract only features with category number using v.extract should
work(?)
v.extract in=r out=rc list=1-9999
or
v.edit map=r cats=1-9999 tool=select
resp.
v.edit map=r cats=1-9999 tool=select -r
Martin
Thanks Martin. It turned out that the problem was associated with missing
centroids, and the v.extract list=1-999999 trick did not work...
Dylan
> Any tips on how to do this / or where work would need to be done?
>
> Cheers,
>
> Dylan
>
> PS: working with GRASS6-CVS
>
> _______________________________________________
> grassuser mailing list
> grassuser@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser