Saturday, 11 November 2017

arcgis desktop - Lengths of lines within individual but overlapping buffers?



I have a set of points for which I have created a 12 mile buffer.


Eventually, I would like to know how many kilometers of road exist within each buffer zone individually?


The problem I see going forward is that the buffers have overlap.


I need each buffer to be individually selectable so that I can apply my roads layer and obtain the desired information.



Answer



There is a way to do this directly in ArcGIS and it's fairly simple. It's the same answer I posted to this question, with a slight change in process output since you have overlapping buffers.




  1. Give your buffers a unique name attribute (rather than just using oid, which you could do, but having a (short) name to follow will make it easier).





  2. Now you need your roads split at all your buffer boundaries, or at least some way to determine which segments (and portions) are in which buffer. You can't use Union (which would be a good solution given its output) because it only takes polygons. A Spatial Join also won't work in this case because while it could assign road segments to multiple buffers, it won't cut the roads at the boundaries. But you do have two other choices.


    You can use Intersect or Identity (requires an Advanced license) on your roads and buffer layer. The result should be a road layer that is cut up into segments wherever a road crosses a buffer line. A new attribute will be added to the road segments with your buffer names. If a road lies in more than one buffer it will be duplicated so that there are two records for the segment, one with each name. Intersect will give you only the segments in buffers (maybe preferable?), whereas Identity will give you all the roads - those not in buffers will have no name attribute value.




  3. Now you get the total length of all roads in any given buffer. There are a couple of ways to do this, including using selections.


    The simplest would be to open the attribute table of your new road layer, right-click on the name field, and choose Summarize. Make sure the name field is selected as your Summarize field, then in the lower box find the Shape_Length field, click the plus next to it and check the box for sum. The resulting output should be a table with the total length of all road segments by buffer name (make sure you have no records selected or clear that check box). The units will be in CRS units, so you may need to convert to miles or feet or kilometers or whatever your desired output unit is.


    You can also use the Summary Statistics tool. You'll put the length field in as your statistic field with a type of sum, and then you'll add name field as a case fields. This tool would let you incorporate it into a model if needed (Summarize is only available through the GUI).





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...