AnsweredAssumed Answered

Variable substitution in hard coded path

Question asked by wtgeographer on Apr 4, 2014
Latest reply on Apr 8, 2014 by wtgeographer
I would like to replace the hard coded  'G:\\Xcel\\Route Tool\\Potter\\Data.gdb\\Landuse_Raster_Clip' with variable landuse_Raster. Can anybody tell me the correct syntax for this?

arcpy.gp.WeightedOverlay_sa("('G:\\Xcel\\Route Tool\\Potter\\Data.gdb\\Landuse_Raster_Clip' 100 'LANDUSE' ('Cropland and pasture' 2; 'Herbaceous Rangeland' 1; 'Nonforested wetland' 10; 'Other agricultural land' 1; 'Strip mines, quarries and gravel pits' 2; 'Mixed rangeland' 1; 'Lakes' 10; 'Residential' 3; 'Commercial and Services' 3; 'Confined feeding operations' 3; 'Transportation, communications and services' 10; 'Transitional areas' 3; 'Shrub-brushland rangeland' 1; 'Other urban or built-up land' 3; 'Bare exposed rock' 3; 'Industrial' 2; 'Reservoirs' 10; 'Forested wetland' 10; 'Mixed urban or built-up land' 3;NODATA 10); 'G:\\Xcel\\Route Tool\\Potter\\Scratch.gdb\\slice_Slope' 0 'Value' (1 1; 2 2; 3 3; 4 4; 5 5; 6 6; 7 7; 8 8; 9 9; 10 10;NODATA NODATA));1 10 1", Weighted)

Outcomes