1

As one of many processes within a workflow/script, I need to convert polygons to rasters. I am using the feature_to_raster tool in ArcGIS 10.1. This is done within a python script, but for the purpose of trouble-shooting I'm also trying these things in ArcMap.

For most features the process works fine, but there are a handful of features which result in empty rasters (i.e., only NoData cells). I do need to have at least one data cell created for each polygon; empty rasters are not acceptable.

I determined that the problems are very small polygons which don't intersect any cell center of my reference (snap) raster, since the cell size is relatively large in comparison to the polygon. If I don't specify the snap raster, I've found that it does successfully create a raster with a single cell that does have a data value. But I DO need to specify a snap raster so that all my outputs line up, and when I do this, I end up with the empty rasters.

I've tried using the alternate tool, polygon_to_raster, and specifying the cell assignment type to either MAXIMUM_AREA or MAXIMUM_COMBINED_AREA, but I still get the empty rasters.

Does anyone know of a workaround?

Thanks!

EDIT 1: I got polygon-to-raster to work when I added an arbitrary priority field.

13
  • 1
    Please edit your question to explain why you are making this conversion. After all, any workaround will be a compromise--it will likely bias many subsequent analyses--so we need to know how to weigh the pros and cons of possible solutions.
    – whuber
    Commented Jun 25, 2013 at 19:17
  • I got the process to work as stated in my edit above. But to address your comment: The rasterized polygon is fed into the watershed process to generate the catchment area (which is later converted back to a polygon). I'm not sure whether it's better to underestimate the original polygon (as happens when it uses the cell-center option) or to overestimate it (as happens when using the maximum-area option).
    – KHaze
    Commented Jun 25, 2013 at 20:43
  • The original is not underestimated: on average, the polygon areas are correctly represented. But I don't understand what you mean by the "watershed process" exactly: that covers a lot of ground! Regardless, given that (by definition) the missing polygons are tiny, does their omission make any material difference in your calculations? I am also curious as to why you need to create a separate raster for each polygon, because it sounds like they are intended not to overlap.
    – whuber
    Commented Jun 25, 2013 at 20:45
  • I am totally new to this forum. How do I mark my question as resolved?
    – KHaze
    Commented Jun 25, 2013 at 20:47
  • Okay, the cell-center option represents the polygon correctly, on average. But the max-area option will always overestimate it. And by "watershed process" I mean the watershed tool in ArcGIS spatial analyst. I have to create a separate raster for each polygon, because many polygons do overlap but they each need separate catchments calculated. I can't go into all the details, but this is necessary.
    – KHaze
    Commented Jun 25, 2013 at 20:51

5 Answers 5

3

I got polygon-to-raster to work when I added an arbitrary priority field. It seems from documentation that it should work without that, but it didn't.

Important note: this works for my purpose because I'm only working on one polygon at a time, within a loop. Results when working with a feature class containing multiple polygons may or may not be as desired.

0

another workaround consists in converting the small polygons to points (feature to point), then using point to raster and finally combine the two resulting raster with the raster calculator.

Note: for your problem, your issue could be solved by reducing the size of your raster cells.

0

When trying to do this conversion, I had the same trouble. I tried to save this to a personal geodatabase and it worked properly. Also,I have unchecked the "background processing" option in Geoprocessing > Geoprocessing options.

0

For me issue was very similar. I tried to covert raster to polygon Again back to raster, I edited the attribute table and just hit control+S to save, and for got to save edited data separately, later I saved once separately with edit tab and run the tool it worked.

0

Set an equal priority attribute value for your features, and then use the Priority Field option in the Polygon to Raster tool. In this way, even if your features have a small area compared to your desired pixel resolution, they will be selected instead of No data. Since they will have the same priority value, the generated raster will also still obey your desired Cell assignment method (e.g. cell center, maximum area), as explained here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.