Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

New to Python! I'm trying to re-path a multitude of rasters currently the workspace is a folder, the intended workspace is a raster catalog in an SDE database - using the replaceDataSource method I'm getting the error as below. Does anyone know if this method cant output as a Raster Catalog or what the actual problem may be?

lyr = arcpy.mapping.Layer(r"C:\Folder\MyLayer.lyr") lyr.replaceDataSource(r"pathToSDEConnectionFile.sde","SDE_WORKSPACE","rasterCatalogName", True) Runtime error : Layer: Unexpected error

Thanks.

share|improve this question

The second argument is the type of the new dataset. I don't think a raster catalog is an sde workspace even if stored in sde; only sde connections are. Try using "RASTER_WORKSPACE" for your keyword.

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.