Polygon to line distance

2231
1
03-29-2014 10:49 PM
KaziSaiful_Islam
New Contributor
Dear All,

I have a dataset that has all the buildings (polygon), central line of the roads (with road width).

I want to create four fields in the attribute table that will store (1) distance of closest road (2) width of closest road (3) distance from second closest road (4) width of second closest road.

Can any of you please help me figuring out the process of doing the same. Please note that I'll only use euclidean distance.
Thanks for your help in advance,
Kazi
0 Kudos
1 Reply
DaleHoneycutt
Occasional Contributor III
Seems like the Generate Near Table tool would be the place to start. You would set the Maximum number of closest matches parameter to 2.  This will yield a table with two records for each building.  It won't have the road width on the table, but you could use something like the Join Field tool to add this information to the table. The next step is to pivot the table.  That is, you don't want two records per building, you want one record with fields like:

  • BuildingID

  • Road1ID (closest road ID)

  • Road1Width

  • Road1Distance

  • Road2ID (second closest road)

  • Road2Width

  • Road2Distance


Off the top of my head, I'd look at the Pivot Table tool to do this, but I'm not sure if it will do exactly what you need.  I'll have to think more about it over lunch .
0 Kudos