Wednesday, 3 October 2018

spatial query - Counting points out of polygon using QGIS?


I would like to count the amount of points that are out of the polygon because I need to sum them.


I know how to count how many points are inside but in need to find how many there are outside.



Answer



A simple method for counting only would be to use select by location in vector menu and select points inside that polygon. Then open the attribute table of your points layer and reverse selection. You can see the amount of selected points at the top of attribute table. If you need to unselect points inside more than one polygon you can use add to current selection instead of create new selection in select by location menu.



But of course you can not store that information in a (not existing) polygons attribute table as you could by using count points inside polygon.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...