RE: [GRASS-user] r.to.vect and then v.clean using tool=rmarea createspolygons instead of holes.
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 ? Btw, I also tried to use v.generalize with a very small threshold and then v.clean. This method works for me. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.to.vect and then v.clean using tool=rmarea createspolygons instead of holes.
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 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
RE: [GRASS-user] r.to.vect and then v.clean using tool=rmarea createspolygons instead of holes.
Thank you Hamish...your set of commands worked great! It still bothers me that r.to.vect would produce invalid topology. Btw, I also tried to use v.generalize but my vectyor seem to lose its attribute table. -Original Message- From: Hamish [mailto:hamis...@yahoo.com] Sent: Friday, December 12, 2008 1:17 AM To: Alex Mandel; Moskovitz, Bob Cc: Grass-User (E-mail) Subject: RE: [GRASS-user] r.to.vect and then v.clean using tool=rmarea createspolygons instead of holes. 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 ? Btw, I also tried to use v.generalize with a very small threshold and then v.clean. This method works for me. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
RE: [GRASS-user] r.to.vect and then v.clean using tool=rmarea createspolygons instead of holes.
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? Btw, I also tried to use v.generalize with a very small threshold and then v.clean. This method works for me. -Original Message- From: Alex Mandel [mailto:tech_...@wildintellect.com] Sent: Thursday, December 11, 2008 3:14 PM To: Moskovitz, Bob Cc: Grass-User (E-mail) Subject: Re: [GRASS-user] r.to.vect and then v.clean using tool=rmarea createspolygons instead of holes. Moskovitz, Bob wrote: Hello Grass-Users, I'm having problems with this sequence of commands: r.to.vect -s input=lszone output=lszone10 feature=area v.clean input=lszone10 output=lszone10_clean tool=rmarea thresh=2800 Below is the output. Overlaying lszone and lszone10_clean, I see that there are large holes that have been replaced with polygons. Is this a bug? Btw, I've tried this with QGIS on Windows XP as well as GRASS 6.4.svn with the same results. Bob Hmm, I'm wondering if there's a flaw in the topology built by r.to.vect What happens if you run v.build before v.clean? At second glance I see how if a small polygon gets removed and it shared a border with the big polygon, that that border might not exist now. maybe add the bpol to tool=rmarea,bpol Alex ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user