Geographic Information Systems Asked by Benny Henny on March 21, 2021
I have a polygon and a layer of many points. How many more points would be captured if I expanded the polygon by x meters? I want to end up with values for x = 1 mile, 5 miles, 10 miles, and maybe a few more. My instinct is to plug it into GIS, calculate a buffer, cut out the original polygon, and count point features, but it may not be feasible when I get more points: I will eventually be using a layer of tens of millions of points.
Is there a faster way to do this, maybe outside of a GIS?
For such a high volume of points I recommend using optimized query processes. But it depends on what software you use.
If you use QGIS I recommend the process toolbox, specifically the Select by Location process, but it is very important that you previously generate the spatial index.
On the other hand, PostGIS, with the spatial indexes previously generated has a better performance.
Another aspect, that you should evaluate, analyzed by several authors, is that if the polygon is very large and covers the extent of the point cloud, in this case the spatial index is not very useful.
It would be advisable to cut your polygon into smaller parts, a grid, and calculate separately each one then accumulate the result.
Of course, this procedure is more practical using programming.
This article discusses the subject in detail
https://geoffboeing.com/2016/10/r-tree-spatial-index-python/#more-2183
Answered by Luis Perez on March 21, 2021
You can use join attribute by nearest
to join the polygon (second input layer in GUI) to your points (first input layer). This adds the attributes of the polygon to the points (irrelevant for you, I know) and also the minimum distance between points and polygon. Then you may use select by attribute
or a filter to get the points you want.
Answered by Erik on March 21, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP