This is a slightly different approach to generate weighted averages for the indicators. It uses @turf/line-split to split the ways by the area polygons, which are then used to generate the averages.
It should handle the following (edge) cases:
ways that are fully within a single area
ways that split multiple areas
ways that have multiple separate segments in the same area (think moon-shaped polygon)
We should probably not call this proximity, but something else. Not sure what though.
This is a slightly different approach to generate weighted averages for the indicators. It uses
@turf/line-split
to split the ways by the area polygons, which are then used to generate the averages.It should handle the following (edge) cases:
We should probably not call this proximity, but something else. Not sure what though.