[GRASS-user] r.to.vect Produces Too Many Areas

   I've done something incorrectly but cannot find what that is.

   Ran r.water.outlet and produced the output basin map. Then I applied
r.null to that map setting nulls to zeros. Next I applied r.to.vect to that
map (with the '-s' option) setting feature to area.

   When I look at the aspect map overlaid by the sub-basin map I see the 5
extraneous cells that should not be there. You can see them on the attached
screen shot.

   This did not happen the last time I used r.water.outlet, and the drainage
map does not suggest to me why these 5 cells are included.

   Help would be appreciated in learning what happened and how to get this
tail off the map.

Thanks,

Rich

On 02/22/2010 10:12 PM, Rich Shepard wrote:

  I've done something incorrectly but cannot find what that is.

  Ran r.water.outlet and produced the output basin map. Then I applied
r.null to that map setting nulls to zeros. Next I applied r.to.vect to that
map (with the '-s' option) setting feature to area.

  When I look at the aspect map overlaid by the sub-basin map I see the 5
extraneous cells that should not be there. You can see them on the attached
screen shot.

What I do in these cases is run v.clean with the rmarea option. I choose a threshold about 5X the cell resolution to get rid of any small areas like these. I think it comes from the way r.to.vect works (others with more knowledge might correct me). Any cell which touchs the contiguous area only at one corner is considered a separate polygon, so you end up with some square vector areas of size nsresXewres.

  This did not happen the last time I used r.water.outlet, and the drainage
map does not suggest to me why these 5 cells are included.

  Help would be appreciated in learning what happened and how to get this
tail off the map.

Thanks,

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918

On Tue, 23 Feb 2010, Micha Silver wrote:

What I do in these cases is run v.clean with the rmarea option. I choose a
threshold about 5X the cell resolution to get rid of any small areas like
these. I think it comes from the way r.to.vect works (others with more
knowledge might correct me). Any cell which touchs the contiguous area
only at one corner is considered a separate polygon, so you end up with
some square vector areas of size nsresXewres.

Micha,

   I'd not used v.clean before so this approach did not occur to me. Works
like a charm. Now I have a new tool to apply when the situation comes up
again.

Toda raba,

Rich