Relative Content

Tag Archive for rspatial

How do I measure distances between multiple coordinates along a stream/flowline?

I am trying to measure the distance between a reference stream gage/location/coordinates and multiple other gages on a stream/river that were discovered using nhdplusTools. I am following a method described here. However, the blogger manually removes stream segments at the end (I need to automate this process) and ultimately only measures the distance between the most upstream and downstream points.

Generating population within 5km radius of any health facility within each district

Given a shapefile of a country with district polygons, population raster and csv of health facilities, I am trying to generate the population within 5km of any health facility for each district. In some districts, I’m getting pop_inside to be more than the entire district population. I will need some help here. The codes are below;