Spatial Analyst question

729
3
08-25-2014 09:38 AM
JimFritz
Occasional Contributor


I would like to assign a percent slope value to individual roads in (polyline) shapefile.  So far I have rasterized the road shapefile, created a slope raster (from DEM data), and run zonal statistics using the rasterized polyline file and slope raster which results in a percent slope grid.  Now, how can you assign the percent slope values back to the original road shapefile?  Unfortunately, the grid that is created from running zonal statistics has no attributes to join to the road attribute table.

Thanks,

J Fritz

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

you can convert a floating point grid to an integer grid by using the raster calculator, scaling up the input grid by some factor of 10...then take the integer...join that to the shapefile...then export to a new shapefile, and rescale backwards in the table.

ie Int("MyGrid" * 10)

0 Kudos
JimFritz
Occasional Contributor

Dan,

Thanks for your advice but ended up using "zonal statistics as table" which retained an attribute to join with.

Jim

BruceHarold
Esri Regular Contributor

If you have 3D Analyst you can use Interpolate Shape to create a 3D shapefile then calculate a slope with some Python.

0 Kudos