<div dir="ltr"><div><div>Sotiris,<br><br></div>Thank you for your reply -- I'll file your suggestion away for future issues. What I ended up doing was to add a column to all my messy polygons using v.db.addcolumn; then to make the value for that field the same for each polygon; then use v.dissolve, identifying that new column as the Name of attribute column used to dissolve common boundaries. The resulting vector map had an appropriate number of polygons. This ended up working very well.<br>
<br></div><div>Cheers!<br></div>Tom<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 21, 2014 at 3:02 PM, S. Koukoulas (listes) <span dir="ltr"><<a href="mailto:sotkouklistes@gmail.com" target="_blank">sotkouklistes@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
This is a late reply, but you might still find it useful. <br>
<br>
You can get rid of single (or multiple) isolated pixels by cleaning
the raster with the following commands:<br>
<br>
r. reclass.area<br>
r.neighbors (with the selection option - appears only in version 7).<br>
<br>
The idea is to reclassify your raster using the area of a single or
multiple isolated pixels ( eg. estimate what is the area of a single
pixel in ha and use it to reclassify your raster), producing a map
that will exclude the pixels selected below this area threshold. You
will end up with a raster with nulls in place of the rejected
pixels.<br>
<br>
Then you can use the r.neighbors to replace these nulls (and only
these, if you use the selection option) with the mode (if it is an
integer/categorical raster otherwise use the appropriate statistic)
of the pixels values in the specified neighborhood. This is done by
using the raster resulted from the r. reclass.area in the selection
option and the original raster in the input. You will end up with a
much more "clean" raster to convert to vector.<br>
<br>
best regards,<br>
sotiris<div><div class="h5"><br>
<br>
<br>
<br>
<br>
<div>On 06/16/2014 02:47 PM, Thomas Adams
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">All:
<div><br>
</div>
<div>I have used r.lake to simulate flood inundation in an urban
area -- the raster looks great! What I want to do (and have
done) is to use r.to.vect, export the vector as a KML (which
works), bring the simulated flood inundation map KMLs into
GoogleEarth and create some animations from the simulated
inundation, including showing rising flood levels inundating
the city streets in 3D.</div>
<div><br>
</div>
<div>I can basically do all this, except that the r.to.vect
conversion creates a gazillion boxes that are the size of the
raster pixels -- I don't want all the tiny boxes. What I want,
is just a single (albeit, complex) polygon showing the flooded
areas. v.dissolve will remove the boundaries of adjacent boxes
if their cat or attributes are the same -- is this the way to
go, namely, make all the cats or attribute values the same and
then use v.dissolve?</div>
<div><br>
</div>
<div>Or, is there is there a better way to do what I'm
attempting to do? That is, is it best to keep the individual
small vector boxes for reasons I'm not considering?</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Tom<br clear="all">
<div><br>
</div>
-- <br>
<div><br>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
grass-user mailing list
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
</blockquote>
<br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Thomas E Adams, III<div>718 McBurney Drive</div><div>Lebanon, OH 45036</div><div><br></div><div>1 (513) 739-9512 (cell)</div><div><br></div>
</div>