I'm creating a Web Application that allows users to visualise multidimensional and spatiotemporal rasters, draw an area on a map and export pixel values from the data-cube into a tabular format.
Ultimately, the application enables users to download pixels values for an area of interest into a table format, where the location coordinates as well as all parameter attributes for the pixel values are exported for further analysis of Ocean data in a tool of their choice.
I have so far explored a number of options and it seems that some of them are pretty slow when it comes to exporting the pixels.
Visualisation speed is OK.
I am looking for advice to make the pixel export workflow as fast as possible so it can run interactively in the browser.
Thank you for any advice.
Tilmann
I'm using the WABIS2.0 widgets for part of it, in a Web App Builder Dev application,
Image Services
GP/web tools,
all published in ArcGIS Enterprise 10.7.1.
My data cube contains about 1600 rasters right now, but this number will grow over time, as new rasters are added, in LERC compressed MRF format.
WORKFLOW:
Users open Web Application in browser, zooms and pans in map. For their area of interest, they open the GP widget which allows them to draw a polygonal area on the screen. This area is where we want to export all underlying pixels from the data cube into records in a table.
For an area that spans around 5 pixels, the application takes about 2 minutes to export the values. This is clearly too long for any users attention span. What's worse is that an export for larger areas times out (after 30 mins which I've configured).
In ArcGIS Pro, I can use the GP workflow model that I've created to run a "Sample" of a large area (about 1000 pixels) in a fraction of a second, when I use the CRF version of my data cube (the transposed multidimensional raster).
In my web tool, I have had no success whatsoever using the CRF version. (I am getting errors about the dataset not being multidimensional)
When I use the non-transposed (parent-child) Mosaic dataset (set described below), the "Sample" process takes very long.
QUESTIONS:
SETUP OVERVIEW:
Data preparation:
Services Setup:
Application Setup:
Web Appbuilder Dev Edition (2.11) with WABIS2 widgets is used to provide the application framework and I publish the application using Netlify
Emily Windahl Steve Kopp Paul Dodd Peter Becker Vinay Viswambharan
There are many different method to achieve this and the optimum choice is dependent on factors such as whether the source is pixel aligned, the total size of the data and type of storage (Local or cloud).
The method you are using works well and is similar to what is used in the Hycom sample.
In this case the source is similar to what you mention, a MRF referenced by a mosaic dataset.
What you are doing is not incorrect, but we know there are limitations to this as the datasets get larger.
This use of a Mosaic dataset and individual rasters per slice is not optimized for the fact that in this case all the pixels are aligned in a single coordinate system. (Remember mosaic datasets can many different coordinate systems simultaneously). Also the data is stored as pixel blocks. To get a temporal profile requires reading many pixel blocks from storage. If the storage is fast and you don't have too many layers then this is not an issue.
In your case you are referring to over 1000 layers, so such as solution would need to read over a thousand pixel blocks for any profile location. (Not optimum).
The solution as you have seen is to use a CRF with Transpose option. The CRF is optimized for the storage of such pixel aligned datasets and the transpose re-arranges the storage of the pixels such that a query for a profile need only make minimal disk access. You would still manage your data by creating a Mosaic dataset.
With ArcGIS Image Server 10.8 you can directly publish a Transposed CRF and the Sample function will then near instantaneously return you the pixel for a point or small area of interest. You can you this for a profile or extract to a table of choice.
One drawback with Pro 2.5/10.8 with CRFs is that you can not append to a CRF so that when you get a new dataset you need to recreate the CRF. (But such an append is available in upcoming 2.5/10.8.1).
What I need to check on is how WABIS provides access to this profile capability. I'll check and get back.
Thanks very much for your reply, Peter –
That all makes sense to me and re-assuring to know that the setup sounds about correct. Can I just ask to confirm that a GP based web tool (in Python on ArcGIS Server 10.7.1 ) which uses “Sample” can’t work with a CRF-transposed raster file (which is what I’m trying)?
My application demo is here https://scenz-md-is.netlify.app/ - it has three GP tools in the top menu, of which the one that does the export into a file is currently broken, but the rightmost one of the three will run the export (for a short line) and then use the values to run an R-ArcGIS Bridge script in a GP tool do create a chart (so basically only does an additional step at the end. The R script runs super-quick, so the majority of time spent in the tool is the “Sample” process.
All rasters, mosaic datasets and the web map are in NZTM (New Zealand Transverse Mercator) projection and rasters are all pixel-aligned.
Cheers,
Tilmann
Hi @TilmannSteinmetz2 ,
Did you get further with the download and sampling of the CRF through time?
We are running 10.8.1 with CRF based multidimensional data (daily timestep for 5 years, 9 variables and 4 ensemble statistics) and have found that the getSample has been not much faster than the NetCDF in a mosaic dataset.
Is your download tool going to allow netCDF as an output?
Cheers,
Mark