Saving raster dataset to enterprise gdb

614
1
05-12-2014 11:00 AM
StephenFricke
New Contributor III
Does anyone know how to save a raster dataset to an enterprise geodatabase.  The raster dataset is the output of a geoprocessing service that I want to be able to save to an enterprise gdb.  I am assuming I have to make an SDE connection and then save the dataset to the table space of interest.  Any help/examples on how to do this would be greatly appreciated.  Thanks!
Tags (2)
0 Kudos
1 Reply
ChrisSnyder
Regular Contributor III
localRaster = r"C:\temp\test.img"
sdeRaster = r"\\mynetwork\temp\mysdefile.sde\test"
#You can build a .sde file on the fly using arcpy.CreateDatabaseConnection_management()
arcpy.CopyRaster_managment(localRaster, sderaster, "MY_SDE_TABLESPACE")
0 Kudos