POST
|
Hi Cody, Yes, this can work even with a 1:M cardinality of features to attachments. It is actually possible to perform a 1:M join in ArcGIS (you would do this in Step 4 of the above workflow); this will create duplicate geometry for any feature that has more than one attachment: Make sure both tables/feature classes are in a file geodatabase. Create the attribute join as you normally would: right click on the larger table, choose join. Be sure to choose the option to Keep all records. You will get join validation errors; this is expected. Right-click on the feature class to which you just applied a join, and export it to a new file geodatabase feature class. After the export open up the table and note that there are now many more records -- instead of only the first matching record being displayed, each matching record has its own line in the table. Remove the attribute join you created. Run through the steps to create the folder path to your photos in the output of the 1:M join, and then use this as the Match Table when you run the Add Attachments tool. The Input Dataset will be the original feature class to which you're trying to add the attachments. This will match multiple attachments to a single feature as specified in the Input Join Field and Match Join Field, and re-create the 1:M relationship class of the downloaded file geodatabase.
... View more
08-22-2016
01:50 PM
|
2
|
0
|
1219
|
POST
|
Hi, Adrian! Sorry about that. The images should work now. -Emilie
... View more
05-31-2016
10:10 AM
|
1
|
0
|
1219
|
POST
|
Hi Jeff, This is a challenge that Enterprise geodatabases and ArcGIS for Server services are well-suited for. However, when working with file geodatabases and hosted feature services, you can get your newly collected attributes from your Collector data into your old feature class using joins and field calculations. Transferring the attachments is a bit trickier, but follows the same basic logic. You can use the following workflow to port your Collector attachments over to your previous geometry without bringing along the geometry created in the Collector app. This workflow could be made into a ModelBuilder model or Python script for automation. 1. Export your ArcGIS Online feature service, edited in Collector, to a new file geodatabase and download it to your local machine. 2. The file geodatabase contains a relationship class which connects the features to the attachments using a GlobalID and a REL_GLOBALID field: 3. Perform an attribute join to append the attribute fields from the downloaded feature class to your original feature class. This join is based on a unique ID that exists in both tables and is necessary because we need to get the GlobalID field created by ArcGIS Online when the photos were collected into your original feature class as shown below. It is a good practice to export to a new feature class after the join has been created to prevent any unexpected behavior caused by an active join. 4. Next, perform an attribute join to append the attribute fields from the downloaded attachment table to the output of Step 3 above. This join is based on the Global ID and REL_GLOBALID fields: 5. It's a good idea once again to make the join permanent by copying the features to a new feature class. Now, we have a single feature class containing your original geometry and containing the Attachment IDs and the Attachment Names from the Collector data downloaded from ArcGIS Online. This will be critical for matching up the correct photos and features. 6. Create a file directory on your computer and batch download all your attachments using the instructions given at http://support.esri.com/technical-article/000011912. 7. Add a new text field to the output of Step 5 for the filepaths of your attachments. 8. Populate the field with your attachment filepaths using Field Calculator. In VB, the code would be: "<path to the folder with your photos>\ATT" & [ATTACHMENTID] & "_" & [ATT_NAME] 9. You should end up with a complete filepath which matches those of the photos you batch downloaded in Step 6: 10. Enable attachments on this feature class using the Enable Attachments tool. Then use the Add Attachments tool to attach the photo/video attachments: This will match your attachments to the correct feature and create a new relationship class between the final output of the above workflow and an attachment table containing your media. Best wishes, Emilie Esri Support
... View more
05-27-2016
05:18 PM
|
6
|
2
|
1219
|
Title | Kudos | Posted |
---|---|---|
1 | 05-31-2016 10:10 AM | |
6 | 05-27-2016 05:18 PM | |
2 | 08-22-2016 01:50 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|