1

I have two vector polygon files. One is flood zones and the other is parcels. I need to add the flood zone category to the parcel file, this is easy enough. However, some of the parcels have multiple flood zones running through them.

I need to assign a rule/rank logic to the join so that if:

if: flood zone x is in parcel use this in the join

elif: zone VE is in parcel use this

elif: zone Ae is in parcel use this

else: return none

(that is my python logic) but it can be any sort of tool to accomplish this. this is similar to the question HERE but I do not care about area percentages to determine which zone is being returned, I want a ranking system.

  • 1
    If you added a numeric field to your flood attributes and calculated each flood category as numerically ordered values you could use Min or Max in a One-To-One Spatial Join to get the value you wanted. As long as the attribute is alphabetic you cannot use geoprocessing to do this efficiently and would have to resort to a One-To-Many join and then write a python script that used a cursor to read the result, pick the optimum attribute based on your logic into a dictionary and transfer that value to the parcel using an update cursor. Creating a numeric field is easier if you don't know Python. – Richard Fairhurst Jun 6 '18 at 15:48
  • this worked perfectly using python function in field calculator you want to add it as answer? – NULL.Dude Jun 6 '18 at 16:03
1

If you added a numeric field to your flood attributes and calculated each flood category as numerically ordered values you could use Min or Max in a One-To-One Spatial Join to get the value you wanted. As long as the attribute is alphabetic you cannot use geoprocessing to do this efficiently and would have to resort to a One-To-Many join and then write a python script that used a cursor to read the result, pick the optimum attribute based on your logic into a dictionary and transfer that value to the parcel using an update cursor. Creating a numeric field is easier if you don't know Python.

  • is there a way to list all values? if the parcel is in multiple zones I can list zone 1,2,3, etc. ? i dont see a list method in the spatial join, i dont believe max, min, variance or stnd. deviation will accomplish thiS? – NULL.Dude Jun 13 '18 at 18:20
  • The Join summary option in the field map creates a concatenated list. It is not sorted and duplicates are allowed, but it will list all values. If you need it sorted or unique you would have to process it with a calculation or script. Make sure you expand the character length of the field in the field map to hold the full list. – Richard Fairhurst Jun 13 '18 at 19:21
  • I do not see a Join Summary option – NULL.Dude Jun 14 '18 at 11:58
  • Join only appears if you set it up step by step. Join is only an option for a text output field, since it is impossible to output a list into a numeric field. So, you first have open the field properties and change the field type of the output from a numeric field type to a text field type and assign a character length for the field that can hold your list (usually 255). Then the Join option will appear in the merge rule drop down. After you choose the Join option then you can assign a Delimiter. – Richard Fairhurst Jun 14 '18 at 18:21

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.