Hi everyone,

I am looking for a tool that allows me to create a shapefile with lines connecting adjacent polygons.

For example: if polygon A has 2 adjacent polygons (B and C), I need to create a shapefile with a line that connects centroid of polygon A with centroid of polygon B and another line that connects centroid of polygon A with centroid of polygon C. The total number of polygons from which I have to do this is 300.

I have been able to do it for 1 polygon but it takes me 6 steps and the creation of multiples shapefiles and tables in the process. It's not a choice when trying to repeat the process for the 300 polygons of the shapefile. I need an easier way to do it !

Any help would be muuuuuch appreciated !

Thank you.

I am looking for a tool that allows me to create a shapefile with lines connecting adjacent polygons.

For example: if polygon A has 2 adjacent polygons (B and C), I need to create a shapefile with a line that connects centroid of polygon A with centroid of polygon B and another line that connects centroid of polygon A with centroid of polygon C. The total number of polygons from which I have to do this is 300.

I have been able to do it for 1 polygon but it takes me 6 steps and the creation of multiples shapefiles and tables in the process. It's not a choice when trying to repeat the process for the 300 polygons of the shapefile. I need an easier way to do it !

Any help would be muuuuuch appreciated !

Thank you.

Use Spatial Join of the layer with a copy of itseld using a very, very small overlapping tolerance. Use the One to Many option. This will cause each polygon to duplicate to cover as many neighbors as it has (plus itself). Filter out the cases where the ObjectIDs of the two layers are the same.

Add a text field called APN_PAIR and create a concatentation of the two parcel numbers with a space separator. Create a Long Integer Field and name it LINE_ORDER and calculate a 1 in it.

Start an edit session. Select all of the parcels in the layer and copy them to itself. While the copied set is still selected calculate the LINE_ORDER field as 2 and calculate the APN_PAIR as the reversed concatenation of the APN values. Save your edits and stop editing.

Use the Feature to Point tool on the data. Check the keep inside option.

Use the Point to Line tool using the concatenated APN_PAIR field as the Line Field and the LINE_ORDER field as the Sort field.

You should now have your lines with the first point in the center of the first APN in the concatenated APN_PAIR field and the last point in the second APN of the APN_PAIR field. Now create two APN fields and calculate the original separate APNs into them. If you filtered a particular APN and use arrowheads they will point out from the parcel.

The screen shot shows the result for 1379 parcels.