I have polyline shapes representing roads and another shape layer with polygons that are representing buildings. I have to find some way with ArcPy to measure the distance from a point within the polyline road,usually in the middle, to the nearest buildings at both sides of the road. Graphically it would be something like this
In short, I'd need some way to use a kind of Near tool but with the functionality about measuring in the direction I want to.
Answer
Finally I got the way. What I did was to create perpendicular lines (Polylines) to roads and get the intersection (arcpy.Intersect_analysis) with buildings, then I calculate the distance between those points.
Script code is available in https://github.com/manuasir/Arcpy_Roads_Width for anyone that needs it.
No comments:
Post a Comment