I've 27084 polygons representing protected areas. I need to convert to raster (where the protected area will be value 1 and the wider landscape 0), then convert the rasters to ASCII. all of which need the same extent.

Any ideas how to do this other than individually converting each one?

I've access to ArcMap 10.5 and R.

  • Do you really need each protected area to be its own ascii raster, instead of a single raster that shows where all protected areas are?
    – Tom
    Jun 26, 2018 at 18:31
  • I'm afraid they need to be separate ASCII files as they are meant to represent different starting distributions of a species.
    – user123054
    Jun 27, 2018 at 13:27
  • I've updated my answer with thorough, step-by-step details of how to do this without using Python or ModelBuilder.
    – Tom
    Jun 27, 2018 at 15:51

2 Answers 2


Perhaps easier than using Python or ModelBuilder, you can simply take advantage of the Batch option in ArcToolbox.

  1. In ArcToolbox, navigate to Data Management Tools > Fields > Add Field
  2. Right-click on Add Field and then select Batch
  3. In ArcCatalog, navigate to the directory that contains your feature classes, select all them and then drag them into the AddField dialog.
  4. In the top row, under Field Name, enter a field name (let's say, 'Occupancy')
  5. Right-click on the field name, and then select Fill. This will populate all the rows with the same value.
  6. In the top row, under Field Type, select "SHORT", and then right-click > Fill.
  7. Click OK, and then all your feature classes will have a new Short Integer field named Occupancy.
  8. Once again, in ArcToolbox > Data Management Tools > Fields, right-click on Calculate Field and select Batch.
  9. Once again, drag and drop all your feature classes to the tool dialog.
  10. In the first row, under Field Name, select "Occupancy", then right-click > Fill
  11. In the first row, under Expression, enter 1, then right-click > Fill.
  12. Click OK to run, and now all of your feature classes will have their new field populated with a value of 1.
  13. Navigate to ArcToolbox > Conversion Tools > To Raster, right-click on Polygon to Raster and then select Batch.
  14. Drag and drop all your feature classes onto the tool dialog
  15. In the top row, under Value Field, select "Occupancy" (or whatever you named your new field), and then right-click > Fill
  16. Be sure that your raster settings (e.g., cell size, cell assignment, snapping) are set as needed in both the tool and in the Environments (see the bottom of the tool dialog).
  17. Click the Check Values button, to populate the output raster paths.
  18. Click OK to run, and then you'll have all your rasters.
  19. Since you need them in ASCII (I don't think you can convert directly from polygon to ASCII...), follow the same pattern as in the previous steps, but using the tool ArcToolbox > Conversion Tools > From Raster > Raster to ASCII.

If you really need the background to be 0 instead of NoData, then you can run a Con where the raster IsNull. See: https://support.esri.com/en/technical-article/000010059


You can create a model with an iterator to do the same in each feature. Find more info here:


Remember to create a geodatabase because is the imput for the iterator.

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.