I have a point feature class in a file geodatabase, I created a raster column to add some photos, but since I have 1300+ lines I can't add every single photo manually, is there a way to add them automatically ? I have a column with the the photos names.
1 Answer
If your photo names in your column match with the filenames you can add them automatically quite easy. But not the way you mention. As far as i know you can´t load the raster-column in the attribute table automatically. But for your exact task there are attachments in ArcGIS. The help page of the tool exercises exactly your task. The only downside is that you need the ArcGIS-Standard license level.
Link to the tool-help: http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/add-attachments.htm The attachments are also show as pictures within ArcMap (via attribute forms from the editor) and are loaded into the FDGB (updating need the to rerun the whole process).
Another option is to just copy your filepath into your table. As you mentioned that you have the photo name already you can use this as a column for joining a list with your file path based on file name. You can create such a list quite easy with the windows explorer. Just copy all files (ctrl+c) and paste them into a text editor (kate as editor works well). You get a list of all file path. Safe the list as .csv and open it in a spread sheet (Libre office for example). Add a column and copy your path. Use find and replace to replace the whole path up to the filename with an empty expression. Now you have your join table with the match column and file path. Add them to your table in ArcMap and use the hyperlink-tool to open the photos. ArcMap sends a call to the operating system to open the file path with your standard application. Downside is that this way the photos are opened outside of ArcMap.
arcpy.da.SearchCursor
) and possibly pull metadata from the images (arcpy.Describe
) before populating the row array, but such a script is possible.