Select to view content in your preferred language

Create Raster Dataset fail

862
2
Jump to solution
08-15-2012 07:31 AM
RichardThurau
Deactivated User
Hi,
Simple python code, keeps failing, not sure what's happening. Any help is much appreciated.

CoordSys = r"C:\Program Files\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\UTM\NAD 1983\NAD 1983 UTM Zone 11N.prj" LCOutDir = r"E:\Projects\TV\TV_Trees_working.gdb" arcpy.env.workspace = LCOutDir SmallTree_mosaic1 = os.path.join(LCOutDir, "SmallTree_mosaic1")   arcpy.CreateRasterDataset_management (LCOutDir, SmallTree_mosaic1, 1, "8_BIT_UNSIGNED", CoordSys, 1, "", "PYRAMIDS 0", "", "NONE", "")



Error message:
Traceback (most recent call last):
  File "E:\Projects\TV\01_Python\LandCover\rtc_LC_2.0.2_Tile_Trees_081412.py", line 50, in <module>
    arcpy.CreateRasterDataset_management (LCOutDir, SmallTree_mosaic1, 1, "8_BIT_UNSIGNED", "", 1, "", "PYRAMIDS 0", "", "NONE", "")
  File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 7062, in CreateRasterDataset
    raise e
ExecuteError: ERROR 999999: Error executing function.
Failed to execute (CreateRasterDataset).

Thanks

Rich
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor
Hi Richard,

It looks like you are specifying the full path of the new raster in the second parameter of the Create Raster function.  This parameter will only require the name of the new raster.  Try the following instead:

arcpy.CreateRasterDataset_management(LCOutDir, "SmallTree_mosaic1", 1, "8_BIT_UNSIGNED", CoordSys, 1, "", "PYRAMIDS 0", "", "NONE", "")

View solution in original post

0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Richard,

It looks like you are specifying the full path of the new raster in the second parameter of the Create Raster function.  This parameter will only require the name of the new raster.  Try the following instead:

arcpy.CreateRasterDataset_management(LCOutDir, "SmallTree_mosaic1", 1, "8_BIT_UNSIGNED", CoordSys, 1, "", "PYRAMIDS 0", "", "NONE", "")
0 Kudos
RichardThurau
Deactivated User
J,
Awesome, thanks. Works great now.

RT
0 Kudos