2

I have a countywide roads dataset that is used by an emergency dispatch system. There are two fields, "Comm_RT" and "Comm_LT", that need to be populated by the name of the community polygon they reside in. I am having trouble finding a way to populate these two fields when the road borders two different community polygons and thus requires that the "Comm_RT" and "Comm_LT" fields be different. I have started by making selections in ArcMap 10.2 of all the roads that intersect two different polygons. Here is an image of a road segment that would have two different values for "Comm_RT" and "Comm_LT": Differing Comm Codes http://slu.s3.amazonaws.com/comcode.PNG

Is there a way to perform a select by location query or a tool in the Network Analyst extension that could be used to solve this?

  • I'm faced with the exact same problem you are. While I haven't had the chance to attempt this, I've theorized about buffering once on the left side of the road and checking which polygon the buffer intersects. Then, repeat for the right side of the road. Note that I'm a computer scientist, not a GIS analyst, so my analysis skills are not the best. – Brynne Apr 17 '14 at 16:11
  • I was able to select all the road segments that cross through two different polygons with Select By Location. I have about 1000 road segments so I would like it to be as automated as possible so the buffering option may not be the rout to go. It has definitely been a troublesome problem to think about. – cbunn Apr 17 '14 at 17:45
5

You could try the Identity tool, using your line features as the input, and polygons as the identity features:

"When the Input Features are lines and the Identity Features are polygons, and the Keep relationships parameter is checked (relationship set to KEEP_RELATIONSHIPS), the output line feature class will have two additional fields, LEFT_poly and RIGHT_poly. These fields contain the feature ID of the Identity Features on the left and right side of the line feature."

With the UID of the left and right polygons in hand, it would then be a breeze to find COMM_RT and COMM_LT.

[edit] Note that you need an Advanced license for ArcMap to have access to the Identity tool

  • That sounds like a great option, but I do not have access to the Analysis toolbox unfortunately. Any idea of a QGIS alternative? – cbunn Apr 17 '14 at 17:19
  • I saw a script once that created a point to the left of and the right of the middle of the line at an arbitrary distance, selected the polygons and populated the fields, this logic would work in any platform that would let you select a polygon using a point. This script was in VBA for ArcGis however the logic is sound - provided the arbitrary distance selects unambiguously. – Michael Stimson Apr 18 '14 at 2:34
  • Ah sorry, I always forget to check licensing requirements. Result of working in a university with no holds barred access to ArcGIS products, I suppose. – Kevin R Dyke Apr 18 '14 at 17:32
  • +1 @KevinRDyke I think it is fair to assume no license level restrictions unless they are specified in the Question. In this case the lack of an Advanced license has so far only been alluded to in a Comment. – PolyGeo Apr 18 '14 at 23:32
3

Without an Advanced level license of ArcGIS for Desktop your best alternative may be to use ArcPy and Geometry objects.

Upon seeing the Comment from @Michael Miles-Stimson I looked in the ArcGIS 10.2 Online Help and found that the Polyline object has a queryPointAndDistance method which:

Finds the point on the polyline nearest to the in_point and the distance between those points. Also returns information about the side of the line the in_point is on as well as the distance along the line where the nearest point occurs.

The Polygon object has a labelPoint property:

The point at which the label is located. The labelPoint is always located within or on a feature.

If you use the labelPoint of the polygon as the in_point to the queryPointAndDistance method on the polyline then you will be able to determine which side of your polyline your polygon is on.

It will take a little arcpy.da cursor work but I think these should provide the foundation for a solution using a Basic level license.

  • This sounds like a viable solution, but it will be my first experience with Arcpy so it will be slow going but thank you for pointing me in the right direction. – cbunn Apr 21 '14 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.