2

I am trying to convert a series of big binary rasters describing data in grey (value 0) and nodata in green (value 1) into polygons in order to derive the extent the data pixels are covering (see also this question: Creating index layer around rasters to rename files using ArcPy with ArcMap?)

enter image description here

This conversion process takes around half an hour for each raster dataset, probably because of the rather large file size and number of columns and rows. I enabled simplify polygons in the Raster to Polygon tool. The aim is to get out a raster data extent such as the blue sample shape in the screenshot below.

enter image description here

Is there a way to speed up this process or an alternative approach, e.g. by using numpy arrays? Or maybe a way to generalize the raster as I am sure the complexity of the raster leads to a longer raster to polygon conversion processing time.

  • 2
    Well yes, sort of, it's a trade-off between accuracy and speed. I will assume your original nodata value per band is 0, use Aggregate resources.arcgis.com/en/help/main/10.2/index.html#//… with cell factor of 5 or 10 and type of sum (or average) anything now not 0 is a 5 or 10 pixel area that contains some data.. the higher your cell factor the faster you'll get but the less accurate your result will be. You can help your accuracy by aggregating each band of your raster (ex 3 band) then Con(B1_agg == 0 && B2_agg == 0 && B3_agg == 0, 1,0). – Michael Stimson May 6 '18 at 12:22
  • 1
    Create a fishnet of points using raster extent as template and then Extract Values to Points. The resulting points holding values will approximately be the raster data extent. Convert these to polygons. Should be alot faster than converting the whole raster to features just to get extent. If you need more accuracy add more points when creating fishnet. – BERA May 6 '18 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.