Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
From: | "Jason Roberts" <> |
---|---|
To: | "'Tim Sippel'" <> |
Cc: | <> |
Subject: | RE: Sample raster time series with buffer |
Date: | Mon, 30 Mar 2009 19:22:52 -0400 |
Hi Tim, Thanks for contacting us about this. We have encountered this scenario twice in the last six months. One
case was your exact scenario: buffer animal locations, sample oceanography
within the buffers, and obtain mean values. The other involved sampling the
region covered by drifting longline fishing gear. Although MGET helps with this
scenario, we haven't yet written a tool that handles it directly. When my colleague was working on it, I suggested the following strategy
for sampling a given time series of rasters: 1.
Using Spatial Analyst Create Constant Raster, create a raster
that has the extent and cell size of the rasters. (Each raster in the time
series must have the same extent and cell size.) For optimal performance, you
may need to clip it down to your study area. 2.
Use Raster to Point to convert that raster to a grid of points
representing the centers of the raster cells. 3.
For each telemetry location: a. Buffer
it b. Intersect
the buffer with the grid of points, to get the points that are in the buffer c. Sample
those points using MGET or Spatial Analysts's Extract Values to Points tool d. Use
the Summary Statistics tool to get the mean value of all the points My guess is that most people who attempt this must resort to
programming. Steps 1 and 2 you can obviously do without programming. It
may be possible to implement step 3 without programming and without doing a
loop. For example, step a can be achieved by buffering all the points using
Dissolve Type of NONE to produce overlapping polygons. The crux of doing all of
step 3 without a loop is step b: I don't remember what happens if you intersect
points with overlapping polygons: are two points created? If yes, then you're
good to go. If not, then, ultimately, you must call intersect once for each
telemetry location. In 3c, if you implement without doing a loop, then you'd want to
use MGET's Sample Rasters Listed in Fields tool, similar to the example on the
MGET web site. The performance of this will be pretty slow. My colleague ended
up sampling 600,000 points in step 3c and it took many hours. I am planning to
rewrite MGET's sampling tools in the future to speed this up as much as I can,
probably by not even calling ArcGIS to perform the sampling and using something
like GDAL to read the rasters directly. This approach suffers if the buffers do not enclose many grid
points. In that case, you may want to know how much of a given cell is
enclosed, and do your averaging based on that. This would require an even more
complicated solution. If this approach sounds like what you want, I'm happy to discuss
more details with you. Best regards, Jason From: Tim Sippel
[mailto:] Hi- I need to sample a time series of rasters averaged over
multi-day time periods using a buffer around the locations of animal telemetry
locations. My animal telemetry observations are made daily, but my
rasters are averaged over 8 days for example and I need to calculate the mean
of the values that fall within the bounds of a buffer around each telemetry
location. The example on the MGET site seems to be a useful
start towards this task, but it only deals with sampling rasters sampled on a
daily basis at point locations (not including buffers). Thanks very much for your help. Best regards, Tim Sippel |