[GRASS-user] r.to.vect and then v.clean using
tool=rmarea createspolygons instead of holes.
Markus Metz
markus.metz.giswork at googlemail.com
Fri Dec 12 08:31:26 EST 2008
Hamish wrote:
> Bob Moskovitz wrote:
>
>> I followed your suggestion, but I'm still getting the
>> same problem. It seems strange that v.to.rast would create
>> a vector file that has flawed topology. Do you know of any
>> alternative to v.clean with rmarea?
>>
>
> v.db.addcol area
> v.to.db option=area
> v.extract where="area > 2800"
> ?
>
That only deletes the centroids of these small areas, the boundaries remain.
From your original post:
vector <lszone10> has
27613 areas
17107 isles
Number of areas without centroid: 11425
vector <lszone10_clean> has
Number of areas: 1362
Number of isles: 1127
Number of duplicate centroids: 3
Number of areas without centroid: 637
Further on, 26251 areas have been removed.
v.clean tool=rmarea also removes areas without centroids, that's why
holes have been replaced by polygons, boundaries of small areas are
deleted. If you want to merge small areas with adjacent large areas,
v.clean would do the job, but for all areas, also areas without centroid.
If you want to keep only larger areas and these unchanged, the method of
Hamish with v.extract would do that.
Or you could do
v.db.addcol map=lszone10 columns="area DOUBLE"
v.to.db map=lszone10 option=area columns=area
and then use where="area > 2800" in further operations.
Markus
More information about the grass-user
mailing list