AnsweredAssumed Answered

arcpy PolygonToRaster ERROR 000918: Cannot retrieve feature class extent

Question asked by iboates on Feb 10, 2017
Latest reply on Feb 10, 2017 by slynch-esristaff

I am trying to convert a polygon feature class (created intermediately as part of a larger process) to a raster, which will have the same snap settings and cell size as another input raster. However, every time i try to run it, I get this error:

ExecuteError: ERROR 000918: Cannot retrieve feature class extent.

I cannot find any help on this issue and I don't know what to do. I have already seen this question and it did not help resolve the issue.

This is the code:

cell_size = float(GetRasterProperties(in_raster, 'CELLSIZEX').getOutput(0))  env.snapRaster = in_raster  PolygonToRaster(buffer_fc, z_field_name, stamp_raster, cellsize=cell_size)  return None

The same parameters work when I execute "Polygon To Raster" diretly from the ArcToolbox GUI.