[GIS] Drawing a Straight Line Between Two Polygons on a Map and Listing Which Polygons It Passes Through

arcgis-10.1arcmaplineshapefile

I have a shapefile of United States counties. I have two counties that I would like to highlight. I would like to draw a straight line distance between them. By straight line, I mean, if you were to lay down, say, railroad tracks that go straight. I want to know which counties this line would pass through.

For example, suppose that I would like to draw a line between San Diego County, California, and Cook County (containing Chicago), Illinois. I would want to know which counties this line would pass through. For example, I imagine it would include counties in California, possibly Nevada, and so forth until Illinois, and obviously not include counties in states like Texas, Oregon, Florida, or Vermont.

I use ArcGIS and ArcMap 10.1. I would very much appreciate any help that you could provide!

Best Answer

You could use Select By Location with your counties as your target layer and your line feature as your source layer. Your selection method would be features that intersect the source layer feature.

If you don't already have an existing line shapefile, you can create your own by first creating a new shapefile or featureclass using ArcCatalog, adding it into ArcMap, and then following these guidlines for editing features. Because your straight line is a theoretical line for your analysis, creating it yourself should be ok.

Once you have your line feature and county shapefile, run the select by location as I mentioned above. Once your features are selected, you can right click your county shapefile in the table of contents and choose Data -> Export Data. Make sure that you have the option to export only selected features checked. Your exported shapefile or featureclass will be just the counties that your line intersects.

Related Question