This forum is shutting down! Please post new discussions at

How to add unique ws_id field for watersheds

I've been getting "KeyError: 0" while trying to run the NDR model. I'm pretty sure that the problem is that I have multiple watersheds but they all have the same value, 0, for ws_id-- which is because, every time I add ws_id to the Attribute Table in ArcMap, it never does anything but give them all zeroes. How do I get it to give each watershed a unique value?

Thank you,



  • swolnyswolny Member, NatCap Staff
    Hi Andie -

    You may have figured this out by now, but if not... Whether you're working in ArcGIS or QGIS, you can go into the attribute table and use their Field Calculator to give the watersheds unique ID values. I usually just set the ws_id to the FID+1 or something like that. For more specific information about using the Field Calculators, please see the documentation for Arc or Q.

    ~ Stacie
  • areidyareidy Member
    That fixed it! Thank you!

Sign In or Register to comment.