![]() # Check out the ArcGIS Spatial Analyst extension licenseĪ="C:/Users/Vaio/FULLPATHNAME/Monthly_Original. The '.save' cannot be capitalized ( AttributeError: 'Raster' object has no attribute 'Save')ĮDIT: Now that I finally have access to the software I was able to revise your code - you may need to modify to suit your actual data (see comments and online help): import arcpy The very last line needs to be changed from 'OutTaster' to 'OutRaster' ( NameError: name 'OutTaster' is not defined) ( RuntimeError: ERROR 010093: Output raster format UNKNOWN is unsupported.) If the default is 0, click the cell with 0 and reenter that same value. The '*' characters used in the output name will cause more errors. To fix this, go to the feature class properties, click the Subtypes tab, and reenter the default subtype code. What are the '*' in 'p_2000_*.*' supposed to mean? If you want variables then you may need a counter variable defined, or extract the original file name from the item used in the for loop with rasterlist to replace the first '*' (perhaps the second '*' could be replaced with the text for the desired output raster file extension). ![]() I attached an image that shows these errors and their error codes. This is the reason for the invalid syntax error: 'OutRaster=(Raster(rasterlist)/100' has two opening parentheses but only one closing parenthesisĭo not use '.Name' for assigning the output name ( AttributeError: 'Raster' object has no attribute 'Name') Note: (lower case) '.name' is Read Only I am trying to perform a weighted suitability analysis with the raster calculator feature, but I am running into a few errors. 'range()' expects atleast one argument - or try something like for ' k in rasterlist:' ( TypeError: range expected at least 1 arguments, got 0) I need to combine two layers: a drainage map (issued from a series of previous operations on a DEM) and a slope map reclassed in 8 classes. 'ListRasters(p)' needs to have the variable 'p' previously defined ( NameError: name 'p' is not defined) I am experiencing a problem with the raster calculator in the ModelBuilder under ArcMap 10. No indentation needed after the import statementsĬheck out the ArcGIS Spatial Analyst extension license using 'arcpy.CheckOutExtension("Spatial")' ( RuntimeError: ERROR 000824: The tool is not licensed.)Īssuming that 'arcpy.workspace="C:/Users/Vaio/./Monthly_Original.gdb"' is not the actual directory path run in the code, but merely abbreviated for posting here - you still need to state arcpy. You might also encounter problems with the filename length. In the 'Environment Settings' window, click OK. Navigate to a directory location without spaces in the pathway, and then click Add. Next to 'Scratch Workspace', click the Open Folder icon. dbf extension.Insert 'import arcpy' at the top of your code ( NameError: name 'arcpy' is not defined) From the Tools menu, select Geoprocessing/Environments. When using some ArcGIS scripts, the output raster will have the same name as the associated dbf file but without the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |