Export Raster Data Type Attributes

3394
2
Jump to solution
03-09-2015 08:34 AM
Highlighted
New Contributor III

Trying to convert all the photos and sketches we have stored in a raster data type field in several feature classes to the new ArcGIS attachments method. Hoping for a built-in tool in ArcMap for this but may have to resort to Python (pretty newbie to Python).

All our data is stored in a SQL Server Enterprise Db. We do have ArcServer installed as well and using AGO so hope using attachments will make the photos viewable on AGO and ArcGIS Explorer and Collector apps.

I've tried this which seems to be exactly what I have in mind, but keep getting an error and the arcpy.da.SearchCursor help says raster fields are not supported.

https://esriaustraliatechblog.files.wordpress.com/2014/01/045.jpg

Here's the error I'm getting:

Runtime error

Traceback (most recent call last):

  File "<string>", line 10, in <module>

RuntimeError: cannot open '\plwc_gis.LANE.WastewaterDataset\plwc_gis.LANE.wwCustomerConnection'

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Esteemed Contributor

Hi Lane,

From the error, it appears it's failing when trying to save the TIFF file.  Try setting the arcpy.env.workspace to a directory.  Ex:

import arcpy, os

output_path = r"C:\temp\attachments"

arcpy.env.workspace = output_path

View solution in original post

Reply
0 Kudos
2 Replies
Highlighted
Esri Esteemed Contributor

Hi Lane,

From the error, it appears it's failing when trying to save the TIFF file.  Try setting the arcpy.env.workspace to a directory.  Ex:

import arcpy, os

output_path = r"C:\temp\attachments"

arcpy.env.workspace = output_path

View solution in original post

Reply
0 Kudos
Highlighted
New Contributor III

That did it! Thanks Jake!

Reply
0 Kudos