I have a raster file, and I want to check how much of my area is covered by the raster image - for this task I have generated RasterDomains, but it's considering the values (Zeros from all bands) for the conversion process. How to get the desired output with out considering the zeros?

 arcpy.RasterDomain_3d(inputraster, outputPoly, "POLYGON")

Here there is no option for avoiding zeros for not considering in the process of RasterDomians.

Image shows the input Raster Image and, Output from RasterDomain and Desired Output as a shapefile

  • Can I suggest to set the 'black' to null then use Raster to Polygon on an IsNull of your input image (aggregated by 5 or 10 can speed/clean things up at the cost of loosing accuracy), you should end up with something like your Desired Raster Domain except you will have a box around the edges and possibly quite a few speckles inside the image. Depending on what you're trying to do with the domain this might be what you need after removing the far outside box. – Michael Stimson Aug 1 '18 at 4:46
  • Is there any option for - editing the input raster image before sending it to RasterDomain_3d tool so that it will only consider the values other than Zeros from all bands.? – Raam Aug 1 '18 at 5:04
  • You could try Set Raster Properties resources.arcgis.com/en/help/main/10.2/index.html#//… to enforce 0,0..0 as NoData, according to the help resources.arcgis.com/en/help/main/10.2/index.html#//… NoData cells are ignored in the output feature. – Michael Stimson Aug 1 '18 at 5:08

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.