[Qgis-user] Select vectorline automatic

Neumann, Andreas a.neumann at carto.net
Fri Feb 19 00:19:28 PST 2016


Hi Lene, 

How about using the modulus operator in the QGIS expression? 

With modulus you can select any nth line, 

e.g. assuming that the tool created features where the gid advances by 1
for each feature, you could  

gid % 2 = 0 

selects gid with odd numbers: 0,2,4,6 

or 

gid % 5 = 0 

would select every 5th number: 0,5,10,15,20 

Hope this helps. 

Just replace gid with whatever is your primary key column. 

Andreas 

On 2016-02-19 08:17, Lene Fischer wrote:

> Hi, 
> 
> I´m creating a tutorial about lawnmoving J for calculating lengths ect. 
> 
> I have created a graticule / vector grid with parallel lines. I want to select every second line automatic. Is there a feature for that? 
> 
> LENE FISCHER 
> 
> Associate Professor 
> 
> DEPARTMENT OF GEOSCIENCES AND NATURAL RESOURCE MANAGEMENT 
> 
> University of Copenhagen 
> 
> MOB +45 40115084 
> 
> lfi at ign.ku.dk 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160219/6ded5c04/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 4863 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160219/6ded5c04/attachment.gif>


More information about the Qgis-user mailing list