philbouchet Posted January 21, 2013 Report Share Posted January 21, 2013 Dear all, I have been attempting to do this for several days without any result. I have a raster DEM (in a WGS84 coordinate system) and I would like to extract random square subsets (of a chosen size) of this raster for processing. What I have done so far is generate a set of random points within the raster extent, create circular buffers around those points and convert these buffers into square buffers using the Feature to Envelope tool. I then use ArcPy to bath clip the raster based on the square polygon features - ultimately generating a number of clipped rasters that is equal to the number of random points I started with. The problem I am running into is that I would like to perform calculations (mean, standard deviation etc. of cell values) within each raster, but I need these calculations to be comparable so that I can make comparisons between say mean values across rasters. My though process was that for this to be valid, I need the same number of cells in each raster subset. However, the initial raster I am sampling from spans -7 to -37 deg of latitude, and therefore the buffers I generate have shapes that vary as a function of latitude (they are geodesic buffers, so those buffers close to the equator are approx. circular, whereas those away from the equator are more distorted). The same applies to the dimensions of the cells of the initial raster DEM. I am getting confused about what I need to do to obtain comparable raster subsets in terms of the cells they contain? Do I need to project my layers to an appropriate projected coordinate system and work from there? Or do I need to adapt the width/radius of the buffers to the position of the points I am applying them to (so as to end up with an equal number of cells in each raster subset)? Many thanks for any suggestions or ideas, Phil Quote Link to comment Share on other sites More sharing options...
yousef2233 Posted January 21, 2013 Report Share Posted January 21, 2013 did you try the zonal toolset, in arcgis spatial analysis toolbox ? Quote Link to comment Share on other sites More sharing options...
philbouchet Posted January 22, 2013 Author Report Share Posted January 22, 2013 No I didn't but I will look into it thanks! I think I may have found another workaround though, by specifying the buffer units as degrees as opposed to a linear distance like km. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.