Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I use ArcEditor licence level, ArcGIS 10.0 version, and we're talking about a file geodatabase.

I have several feature classes (electric energy domain) and I want to connect them using relationship classes, so I want to use their ID's as foreign keys.

I want to automatically create a significant unique ID for each feature. It'a a text type ID, which would be composed of two letters and several numbers (ex. CH00123, CH00124). The ID would give me three info : what type of feature we're talking about (channel- CH), on which street it is (00), and it's unique code (123). I don't want to type this code for every feature I create, I need something to automatically assign an ID to each feature.

I am not sure how to handle this situation. Do I need to use a data integration software? an engine to generate me special ID's?

Thanks for suggestions.

share|improve this question
    
Have you discovered a solution for this issue yet? We are trying to accomplish the same thing only the data resides in a personal gdb. probably need to convert to file gdb. Let me know. Thanks. –  hodeware May 8 '13 at 17:14
    
try using Attribute Assistant the GENERATE-ID method. –  Ligia May 9 '13 at 6:18
add comment

3 Answers 3

You just need to create a new field in your feature class and use the Field Calculator to create the unique ID based on fields in the class. Something like:

"CH%s%s" % (!StreetField!, !UniqueCodeField!)

using Python.

share|improve this answer
add comment

If you want to assign IDs (or another field) automatically, you should programmatically create Class Extension that listens to edit events and updates corresponding Id field http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//000100000201000000

share|improve this answer
add comment

It might be worth looking at the Infrastructure Network Editing (ArcGIS 10) to see if the attribute assistant can be configured to create your IDs. I don't recall if it can be used outside of a network.

http://www.arcgis.com/home/item.html?id=14bdfb26bc2f4e0388a633fbd0ccca02

Zip

Infrastructure Network Editing also includes an editor extension called the Attribute Assistant. This extension uses a series of pre-defined methods to automatically populate attributes for you when updating and/or adding new features to the geodatabase.

I previously worked at utility where we did not use Infrastructure Network Editing and instead had custom tools based on megadrofan's approach. We moved the actual ID creation to database stored procs and the extension makes calls to the stored procs for ID values.

share|improve this answer
    
Remark, stored procs are only avaliable in enterprise geodatabases. –  megadrofan Apr 6 '12 at 11:21
    
Stored procs are available in the underlying relational database of an ent. gdb OR in a separate database independent of any geodatabase. So you can edit in pgdbs/fgdbs and still draw your ids from elsewhere (like a stored proc or a web service). –  Jay Cummins Apr 6 '12 at 12:37
    
Sorry, I was inaccurate in term enterprise geodatabase. Of course i meant underlying RDMS. –  megadrofan Apr 6 '12 at 13:04
    
Thank you all for your help. I'll let you know how I solved the problem. –  Ligia Apr 9 '12 at 13:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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