I have three shapefiles: a) polyline with rivers and streams (also as polygon available to me), b) polylines of highways and roads and c) point file with locations in the riparian vegetation. I want to calculate the distance of each point to the nearest road or highway, on the same side of the river.

This means, that the tool "NEAR" in ArcGIS is not appropriate as it calculates the distance to the nearest road regardless of the side. What I am looking for is to incorporate a barrier, or anything similar in its outcome, that only the distances from the locations to the roads on the same side of the rivers are calculated.

What would you suggest?

I am using ArcMap 10.0.


2 Answers 2


You need to turn your analysis to Raster.

Try the Proximity analysis set of tools found in ArcMap http://resources.arcgis.com/en/help/main/10.1/index.html#//018p00000007000000

You can use the Cost Allocation tool to set the barriers http://resources.arcgis.com/en/help/main/10.1/index.html#//009z00000016000000


A non Arcmap answer.

load your tables in PostGIS.

Run something like:

SELECT DISTINCT ON (pid) pid,rid,ST_Length(dist_line) dist FROM (SELECT points.id pid, roads.id rid ST_ShortestLine(points.geom,roads.geom) dist_line FROM points, roads) a LEFT JOIN rivers ON ST_Intersects(dist_line, rivers.geom) where rivers.id IS NULL ORDER BY dist;

It will not work in all cases. But the idea is to avoid cases when the shortest line between the point and road intersects any river geometry. But that can happen also when the road is on the same side if the river is making big turns.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.