<div dir="ltr"><div dir="ltr"><br><br>On Sat, Apr 20, 2019 at 8:27 PM Micha Silver <<a href="mailto:tsvibar@gmail.com">tsvibar@gmail.com</a>> wrote:<br>><br>> Trying to address this SE question:<br>><br>><br>> <a href="https://gis.stackexchange.com/questions/319319/how-to-apply-smoothing-filter-only-to-way-bigger-than-specified-number-of-nodes">https://gis.stackexchange.com/questions/319319/how-to-apply-smoothing-filter-only-to-way-bigger-than-specified-number-of-nodes</a><br>><br>><br>> I tried to apply v.generalize to a subset of area features, using a where clause, but it doesn't seem to be working. All features are generlized, as if the where clause is being ignored. Here's an example from the nc_basic_sm MAPSET:<br>><br>><br>> micha@TP480:~$ v.extract geology output=my_geology --o where="GEO_NAME='Qp'"<br>> WARNING: Vector map <my_geology> already exists and will be overwritten<br>><br>> .....<br>><br>><br>> micha@TP480:~$ v.db.addcolumn my_geology column="area_sqkm DOUBLE"<br>><br>> micha@TP480:~$ v.to.db my_geology option=area column=area_sqkm unit=kilometer<br>> WARNING: Values in column <area_sqkm> will be overwritten<br>> .....<br>> 326 records updated/inserted (layer 1)<br>><br>><br>> # Only 21 features are larger than 10 <a href="http://sq.km">sq.km</a>.:<br>><br>> micha@TP480:~$  v.db.select -c my_geology column=area_sqkm where="area_sqkm>10" | wc -l<br>> 21<br>><br>><br>> micha@TP480:~$ v.generalize my_geology output=my_geology_smooth type=area method=douglas thresh=100 where="area_sqkm>10" --o<br>><br>> ....<br>><br>> v.generalize complete. Number of vertices for selected features reduced<br>> from 44238 to 7540 (17% remaining)<br>><br>><br>> Now viewing both my_geology and my_geology_smooth shows that *all* features were smoothed. Including those island polygons that were much smaller than 10 <a href="http://sq.km">sq.km</a>.<br>><br>><br><div>> Am I missing something?</div><div><br></div><div>Yes, the option layer defaults to -1 = all layers. If you use the cats or where option, you need to specify a layer, otherwise the warning</div><div>WARNING: No layer selected, 'where' and 'cats' options are ignored</div><div><br></div><div>is issued in trunk. I have backported this warning to relbr76 in r74409.</div><div><br></div><div>HTH,</div><div><br></div><div>Markus M<br></div><br></div></div>