1

The following Python script returns the error on the final line, "RuntimeError: ERROR 010093: Output raster format UNKNOWN is unsupported.":

import arcpy
inRaster = arcpy.Raster(r'C:/junk/raster.tif')
outRaster = r'C:/junk/out.jpg'
intermediateRas = inRaster
intermediateRas.save(outRaster)

The script runs to completion if outRaster is .tif or ESRI GRID. Why does this not work for .jpg (or .jpeg)? According to the list of supported raster formats, JPEG should work.

  • ArcGIS 10.2.2
2
  • have you checked the number of bands (3) and the pixel depth (8bit) ?
    – radouxju
    Nov 12 '14 at 19:27
  • I assume you are referring to 'inRaster', since 'outRaster' does not exist. I have tried and failed with 3 band 8 bit, 1 band 8 bit, 3 band >8 bit.
    – phloem
    Nov 12 '14 at 19:45
4

JPEG is not supported as an output format:

The save method supports all raster formats supported by Spatial Analyst. In the example below the raster save method is used to save data to a file geodatabase raster and to IMAGINE format.

Supported raster 'save' formats for spatial analyst:

Output raster data formats The supported output raster formats are the following: Esri Grid Geodatabase rasters (This includes File, Personal, and ArcSDE geodatabases.) TIFF (.tif) ERDAS IMAGINE (.img) The location and name you specify for the output raster determines the format in which it is created.

When using raster.save your choices are Geodatabase Raster, Esri Grid, GeoTiff and ERDAS imagine format.

0
-1

I'm pretty sure you need to be using this method

arcpy.RasterToOtherFormat_conversion (Input_Rasters, Output_Workspace, {Raster_Format})

You can rename your raster using this method

os.rename()

More here: http://resources.arcgis.com/en/help/main/10.2/index.html#//001200000032000000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.