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'm new to ArcGis and I'm making the first steps at this time. At the moment I've two different shape files. The first shape file represents streets on a map with some detailed information in the attribute table. The 2nd shape file represents crossroads of the same map including some detailed information in the attribute table too. Both attribute tables has IDs and logically it’s a tree where to node is a crossroad and the edge is a street.

Now the next step is to create a Relationship Class to "link" both shape files for future algorithms. But when I want to create a Relationship Class I receive different errors. I’ve read this document before and tried to create such a class using an Add-in but I received a NotImplementedException.

To be sure that creating such a class is possible I tried to create a relationship class which ArcMap using ArcToolbox -> Data Management Tools -> Realtionship Classes -> Create Relationshop Class manually. I can choose both shape files but when I have to choose the Output Relationship Class I receive the error “000177 : Relationship classes can only be created in the same database that contains the feature classes or tables.“

Can someone give me some notes what I’ve done wrong and tips to solve this problem?

Edit:

I've created a Relationship Class with ArcCatalog, a new personal db and the imported shape files. But I can’t open this table and control if the table was successfully created and has content. Does anyone have had a similar problem?

Edit2:

What I've done:

1) Create a new Personal Geodatabase using ArcCatalog10

2) Import 2 Feature Classes (existing shape files filled with data)

3) Start creating a Relationship Class using ArcToolBox -> Create Relationship Class

4) For testing I created a one-to-one relation with this two imported shape files

5) The table was created successfully but:

5.1) If I want to import this in ArcMap I receive the message "Warning: A selected Item could not added to the map" and nothing happened

5.2) The preview function in ArcCatalog doesnt work for this Relationship Class

In Summary I cant see if the Relationship Class is logically right and I cant see which data are selected and can be used for future algorithms.

share|improve this question
    
I think you want a geometric network, not a relationship class. –  blah238 Jan 9 '13 at 10:47
4  
In either case you will need to import your shapefiles to a geodatabase. Shapefiles do not support geodatabase behavior such as relationship classes and topologies. –  blah238 Jan 9 '13 at 10:48
    
Thanks for the reply. I will have a look at geometric networks. Do you have an example how I can import the shapefile into a (new?) gedatabase and make them accessible (C#) and visible (ArcMap)? –  FredFloete Jan 9 '13 at 10:53
1  
Instead of using the comments section which is limited in length, you can edit your original question to add details. –  blah238 Jan 9 '13 at 19:05
2  
I disagree that creating everything programmatically is the best solution. It rarely is. Use template GDBs, XML workspace documents, or good ol' Copy/Paste instead of programmatically creating things. –  blah238 Jan 9 '13 at 23:16

1 Answer 1

Although this question was asked a year ago, I would like to provide an answer for those who may find this blog through some other search with regards to the relationship class creation only.

When working with relationship classes, only a relationship of many-to-many will appear in ArcCatalog with the ability to preview (ArcGIS 10.0 & 10.1). A many-to-many relationship class automatically creates an intermediate table, which in turn, acts as a regular table within the database. All other cardinalities will not be viewable UNLESS you choose the option to add attributes within the creation wizard, (whether bogus or real) in order to create this intermediary table. Then and only then will you be able to preview the relationship class and add it to ArcMap.

If adding additional/bogus attributes is not an option, one way to test the validity of the relationship is to edit the data that participates in the relationship class and review the additions/deletions and their attributes in each of the feature classes/tables. Bascially test its workflow by definition.

Here is a link that describes this information (it talks about many-to-many, however it does not specifically discuss the caveats for other cardinalities).

http://resources.arcgis.com/en/help/main/10.1/index.html#//004t00000004000000

~ Michelle

share|improve this answer

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.