Tag Info

New answers tagged


whether a point [(x,y)] lies within a polygon [(x,y), (x,y), (x,y), (x,y)] but the code fails if the point lies on a boundary or a vertex You need to understand the topologic rules: From Quirks of the "Contains" Spatial Predicate Polygons do not contain their boundary (Geometry A contains Geometry B if no points of B lie in the exterior of A, ...


I used this model to iterate select by location, which works for the selection of polygon which touches neighbor polygon. Islands aren't selected. It's not dynamic yet, work in progress.


Looking at your model image there are four things wrong with what I see: The Calculate Value tool is outputting a BOOLEAN you have data type set to Variant. The code in the Calculate Value tool is returning a string but you want to return a BOOLEAN so turn "true" into True and "false" into False, note first character is capitalized. You are trying to use ...


The solution I ended up using was to replace "selectbyattribute" "selectbyexpression" and place it in a loop, each time iterating through my list of streets and adjusting my "expression" accordingly. processing.runalg('qgis:selectbyexpression', Input, expression, 1) Setting "1" as the third attribute adds to the current selection.

Top 50 recent answers are included