2

I have a roadway network shapefile which only contains the center line of the roadway. I'm trying to create directional roadways from the center line. So I use "Copy Parallel" to create roadways at both sides of the center line and then add attribute to specify the direction. This is not a good method since the length of the lines do not change, so the ends of each segment can't meet (See 1st pic). Is there anyway to do it like tracing?

Another problem is that after adding the parallel lines, I need to specify the direction of the parallel lines (whether it is northbound or southbound roadways). Since one roadway is consist of multiple segments, it takes a lot of time to manually select roadway of one direction. I can't use "Select By Attribute" since it is difficult to differentiate the parallel lines after copying and pasting.So I'm wondering if there is a way to select the whole road (multiple segments) by picking the start and end point of the roadway (So all segments directly connect to each other will be selected)?

Any suggestions would be very much appreciated. Copy Parallel

Select Centerline

4
  • 1
    Press 'N' when editing 'Select next feature' resources.arcgis.com/en/help/main/10.2/index.html#//…
    – Mapperz
    Jul 18, 2013 at 17:38
  • HI Mapperz, thanks for suggestion. With Keyboard shortcut "N", I still need to select the segments one by one, it works the same as I use "Interactive Selection Methods"- "Add to Current Selection".
    – 12B01
    Jul 18, 2013 at 17:47
  • I'm wondering if there is a way by selecting the start and end points of the road, all the segments along the road will be selected automatically at once?
    – 12B01
    Jul 18, 2013 at 17:49
  • Why not collapse the duals? Collapse Dual Lines To Centerline (Cartography) resources.arcgis.com/en/help/main/10.2/index.html#//…
    – Mapperz
    Jul 18, 2013 at 19:28

1 Answer 1

0

If you need to differentiate direction in the copied streets, the following might work: (Assuming left=north, right=south)

  1. Copy Parallel on the Left.
  2. Delete original centerline.
  3. Select by attributes for that street name to update direction for North streets.
  4. Copy Parallel on the Right, doubling the distance.
  5. Select by attributes for that street name without a direction for South streets.

The following could easily be translated into a custom script that takes the 4 parameters as input.

lyrname = "currently edited layer name"
stname = "street fieldname"
stcurr = "current street name"
dirname = "direction fieldname"

Step 2 can be automated like so:

rows = arcpy.UpdateCursor(lyrname, "\"{0}\"='{1}'".format(stname, stcurr))
for row in rows:
    row.setValue(dirname, "NORTH")
    rows.updateRow(row)
del row, rows

Step 5 can be automated like so:

rows = arcpy.UpdateCursor(lyrname, "\"{0}\"='{1}' AND {2}=''".format(stname, stcurr, dirname))
for row in rows:
    row.setValue(dirname, "SOUTH")
    rows.updateRow(row)
del row, rows
5
  • Hi Paul, thanks for your help! You are right. The center line remain selected after Copying Parallel. But the problem remains. I need to differentiate the Northbound and Southbound streets which are created from the centerline. I need to select them separately and then change their attribute to specify the roadway direction, which means I still need to manually pick them out one by one.....
    – 12B01
    Jul 18, 2013 at 18:51
  • I see the problem now. Updated my post with a potential solution.
    – Paul
    Jul 18, 2013 at 18:57
  • Hi Paul, I guess GIS does not have a function can allow me to do it at once. So I think your solution is a good way to solve this problem! Thank you so much :)
    – 12B01
    Jul 18, 2013 at 19:28
  • Without using ArcObjects, I you can't access Copy Parallel from the arcpy module. If this is something you will be doing a lot of, it would be worthwhile looking into. You could automate select by attributes and calculate field though easily enough in arcpy.
    – Paul
    Jul 18, 2013 at 19:37
  • I have never used ArcObjects before. Thanks for your suggestion! I will take a look into it.
    – 12B01
    Jul 18, 2013 at 20:25

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.