[GRASS-user] How to extract only areas, without boundaries from a vector file ?

Moritz Lennert mlennert at club.worldonline.be
Fri Feb 8 04:14:36 PST 2013


On 08/02/13 12:02, Le Jeune Yann wrote:
> Hi,
>
> Working on GRASS7 / debian, i would like to extract only areas but
> "v.extract --overwrite input=ZONE type=area output=ZONE_AREA" produce 1
> area and 1 boundary, each of them with cat and attributes.
>
> I would like only a vector file with cat and attributes of the areas.
>
> If someone has a solution ?

This means that your boundaries have cat values in ZONE already and they 
are just preserved. Erase those cat values before the extraction:

v.category ZONE op=del cat=-1 type=boundary out=zones_temp
v.extract input=zone_temp type=area output=ZONE_AREA

If your input does not have cat values on the boundaries, the output 
won't either:

GRASS 7.0.svn (nc_spm_08):~ > v.extract census_wake2000 type=area 
out=test_all
GRASS 7.0.svn (nc_spm_08):~ > v.category test_all op=report
Layer/table: 1/test_all
type       count        min        max
point          0          0          0
line           0          0          0
boundary       0          0          0
centroid     105          1        105
area         105          1        105
face           0          0          0
kernel         0          0          0
all          105          1        105

Moritz


More information about the grass-user mailing list