Geographic Information Systems Asked by Klaus_Asbjorn on February 1, 2021
I am looking to measure the impact of urban green on pedestrian route choice, and in that connection I want to create a new field within a line layer that counts how many trees exist in a radius of 10 meters from the center of each feature in the line layer. (could also be within the radius of 10 meters from the two extremes of the line, doesn’t matter so much).
I am working in QGIS 3.4.13-Madeira.
Am at a total loss as to how to do this, and can’t seem to find any articles that might point me in the right direction.
(the points are trees)
Assuming your roads
layer has no respective field yet:
Whole number (integer)
aggregate( '<tree_layer_name>', 'count', '', distance( geometry( @parent ), $geometry ) <= <dist> )
<tree_layer_name>
replaced with the actual name of the tree layer, and <dist>
replaced with the search radius around the line feature<dist>
value will be treated as units of CRS, meaning that, if your layers are referenced in EPSG:4326 (or any geographic reference), these will be degrees. For it to be treated as meters, make sure your layers are projected in a suitable metric projection!Answered by geozelot on February 1, 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