What field names do you use for Address Ranges? Developing a Python Add-in

2088
4
03-29-2016 11:51 AM
Highlighted
MVP Honored Contributor

I would like to know what field names are used in the GIS community to represent the Address Ranges fields that capture the Left From Address, Left To Address, Right From Address, and Right To Address.

.
I want to know this because I am designing an add-in editor extension and toolbar for Address Management, but to avoid direct editing of the code and to make it easy for everyone to use I need to supply a list of all possible Address Range field name formats into a combobox.  If the field names are in my pre-built combobox list the tool will automatically detect the fields that match the chosen editable polyline layer, and only ask for confirmation when there is more than one recognized field name format in the data.

If for some reason the field names are not in the list the user can still type their own address range field names into the combobox to add them to the list without editing the add-in code so the tools will still work. Even though the actual fields can be in any order in the target data, for the tool to do the proper edits the fields have be added to the list in the order shown above, which may confuse some users.  Users also would have to enter the set of field names every time they restarted ArcMap, unless they directly edited the add-in code.  But if the format is in my pre-built list of address field formats, the user will not ever have to type them.

So far the formats that I have put into the combobox are:

""L_F_ADD, L_T_ADD, R_F_ADD, R_T_ADD"

"F_L_ADD, T_L_ADD, F_R_ADD, T_R_ADD"

"LEFTFROM, LEFTTO, RIGHTFROM, RIGHTTO"

"FROMLEFT, TOLEFT, FROMRIGHT, TORIGHT"

"LEFT_FROM, LEFT_TO, RIGHT_FROM, RIGHT_TO"

"FROM_LEFT, TO_LEFT, FROM_RIGHT, TO_RIGHT"

"LEFT_FROM_ADDRESS, LEFT_TO_ADDRESS, RIGHT_FROM_ADDRESS, RIGHT_TO_ADDRESS"

"FROM_LEFT_ADDRESS, TO_LEFT_ADDRESS, FROM_RIGHT_ADDRESS, TO_RIGHT_ADDRESS"

"LFROM, LTO, RFROM, RTO"

"FROML, TOL, FROMR, TOR"

Let me know if I have missed the field name format(s) you use so I can add it/them to the combobox list.

So far the toolbar has:

1) The ArcMap built-in Edit Vertices tool and Flip command for flipping edit sketch geometry of one line (I didn't want to reinvent the wheel).

2) Nine (9) different buttons that will operate on multiple selected lines at the same time to swap address range field values in all directions (Three (3) complete range swap buttons to handle full address reversal, side to side only, and from end and to end only and six (6) address pair swap buttons that will do side to side swaps at either end of the line, from end and to end swaps on either side of the line, and diagonal swaps for either pair of opposite corners) to synchronize address parity with the line direction.

3) A split line and address tool that works with both text and numeric address range fields.  This tool works the same as the normal split line tool for polylines that do not have address range fields, but for data that does have address range fields it also proportionally splits the address ranges.  It preserves each sides ascending/descending range orientation and properly proportions each segment even when the two sides have opposite range orientations.  There are also two comboboxes that will let the user adjust the Split behavior.  One combobox sets a maximum radius surrounding the point where the user clicked in which a split can take place, and the other combobox sets a snap vertex delta that will split the line at the nearest vertex only when the difference between the distance to the nearest vertex and the nearest edge does not exceed the delta.  The split line and address tool works for Projected Coordinate Systems, but I have yet to test it with Geographic Coordinate System data.

I plan to create a Planarize Lines and Addresses tool that will work on multiple lines that intersect each other, but I may release the toolbar without it and issue a new version later.

Reply
0 Kudos
4 Replies
Highlighted
Occasional Contributor

L_ADD_FROM (T5)

L_ADD_TO (T5)

R_ADD_FROM (T5)

R_ADD_TO (T5)

Reply
0 Kudos
Highlighted
MVP Honored Contributor

Thanks Patricia.  I have added your format and the reverse to the combobox list below the first pair (the format my users use):

"L_ADD_FROM, L_ADD_TO, R_ADD_FROM, R_ADD_TO"

"FROM_ADD_L, TO_ADD_L, FROM_ADD_R, TO_ADD_R"

Reply
0 Kudos
Highlighted
New Contributor III

LEFT_FROM_ADD

LEFT_TO_ADD

RIGHT_FROM_ADD

RIGHT_TO_ADD

Reply
0 Kudos
Highlighted
New Contributor III

When I flip a centerline I often need to flip several other attributes (municipality, postal city, zip code, response area keys/values) as well.  Would there be an easy way to set this up to do that too?  Granted, that probably requires that the code "know" all the different values that need to be checked and what the corresponding fields are called.

When I was thinking of developing something similar to this, I was heading down the path of checking the values on the left and right "sides" of the street to see if they were different then swapping them if they were.  For example, if CITY_L <> CITY_R, swap them.

Just for fun, here's a list of the all fields we have to check if we're flipping the direction of a line:

CITY_L & CITY_R

ZIP_L & ZIP_R

PCITY_L & PCITY_R

To_Elevation & From_Elevation

ESZ_L & ESZ_R

PSAP_L & PSAP_R

COUNTY_L & COUNTY_R

F_EXT_KEY_L & F_EXT_KEY_R

L_EXT_KEY_L & L_EXT_KEY_R

RD_L & RD_R

OneWay (If "F", change to "T" or if "T", change to "F")

Reply
0 Kudos