Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
- From: Jason Roberts <>
- To: Elizabeth Phillips <>, "" <>
- Subject: RE: [mget-help] Extract multi values to points in MGET?
- Date: Mon, 5 Dec 2016 18:30:56 +0000
- Accept-language: en-US
- Authentication-results: spf=none (sender IP is ) ;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi Elizabeth,
MGET has a tool that is equivalent to “Extract Multi Values to Points” that is called “Interpolate Raster Values at Points”, under MGET à Spatial and Temporal Analysis à Interpolate à Raster Values at Points. This does the same job as the Extract Multi Values but stores the results in existing fields rather than creating a new point feature class or shapefile containing new fields named by ArcGIS. (The MGET tool also existed long before Extract Multi Values.) This probably won’t help much with your problem.
MGET also has a tool called Interpolate Time Series of Rasters At Points. This tool is almost what you want. It can take a geodatabase or directory tree that contains rasters with dates in their names (e.g. sst20161205.img), point features with a date column, match the points to the rasters by date, and sample the raster values. The encoding of dates in raster names can take many possible formats—you have to tell the tool how the dates appear, as well as some other characteristics about the time series. Hours, minutes, seconds are allowed but optional. The tool has some complicated parameters but is very powerful once you understand them.
The trouble with this tool is you do not have a directory or geodatabase of rasters. It sounds like you have a netCDF file that either has one 3D variable (dimensions time, y, and x) or possibly 1944 2D variables. To use the MGET tool without writing code, you’ll have to somehow export those netCDF hourly slices to a set of rasters, with dates in their names. ArcGIS does not have a way to do this trivially.
ESRI wrote a tool to demonstrate how to do this with code; their example includes a toolbox that wraps the code. You might be able to just run that directly. But it looks like they just name the rasters Band_X.tif, where X is the band number incrementing from 1. You’d need to modify that to name the raster using the date and time.
You may also be able to accomplish it within ArcGIS Model Builder using iteration. Basically, call Make NetCDF Raster Layer and then Copy Raster to write it out, iterating this over each slice.
Finally, it is also possible to write some Python that uses MGET’s Python API directly. We don’t really support this—we don’t have the resources to maintain and document a public API—but it is possible. Internally MGET understands 3D and 4D gridded data and can sample a 3D netCDF variable or time series of 2D variables directly (without creating rasters) in essentially two function calls. I won’t say “two lines of code” because they are quite complex function calls—one to describe the characteristics of the dataset to sample, the other to perform the sampling. It is more like “half a page of code”, since it makes sense to break those up onto multiple lines. :-)
If you are stuck and want to try this last route and can point me to the netCDF somehow, I can write a quick example.
Best,
Jason From: [mailto:]
On Behalf Of Elizabeth Phillips
Hello,
I am curious if there is a tool in MGET similar to the "Extract Multi Values to Points" tool in ArcGIS? The reason is because I think I've pushed the limits of the tool in ArcGIS, and I'm looking for other solutions (including python, R or hopefully with MGET).
I have a NetCDF file of surface salinity values in 1-km grid cells with x-y locations (290x510 cells). The salinity values are in hourly increments across ~70 days (1,944 bands). I also have seabird satellite tag locations (~3000 locations) with date-time stamp, and I want to extract the salinity value at each seabird location, matched (or interpolated to closest value) in space and time.
Is there a way to do this in MGET that I haven't found yet?
Thanks for your help,
Elizabeth
-- Elizabeth M. Phillips |
- [mget-help] Extract multi values to points in MGET?, Elizabeth Phillips, 12/02/2016
- RE: [mget-help] Extract multi values to points in MGET?, Jason Roberts, 12/05/2016
- Re: [mget-help] Extract multi values to points in MGET?, Elizabeth Phillips, 12/15/2016
- RE: [mget-help] Extract multi values to points in MGET?, Jason Roberts, 12/05/2016
Archive powered by MHonArc 2.6.19.