Hello, I am trying to convert my NumPy array of shape (360,700,450) to multidimensional raster file. My goal is to export raster data to point feature layer.
What I'm trying to do is timeseries of average temperature for certain points. I have my temperature data stored in NetCDF file, which I am trying to convert to raster, so I can use ExtractMultiValuesToPoints method.
Firstly I made a cycle, which converted n-th dimension of .nc file to 2D array, then converted to raster using NumPyArrayToRaster, then extracted data to points and removed raster. The cycle repeated this for all days of timeseries. This worked fine but whole process took a long long time.
What I wanted to do is firstly make 3D array, with first dimension value of "day". I created array succesfuly but using NumPyArrayToRaster I am unable to create multidimensional raster. Process works just fine, I get "succesful" message after finishing NumPyArrayToRaster . However, I am unable to generate something else than singleband raster.
So again, the problem is: NumPyArrayToRaster always returns singleband raster, no matter how many dimensions does the array have.
ArcGIS Pro 2.4
Looks like there is a bug logged for this: https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDExNDExNw==
That link lists a workaround of compositing the single band output back into a multi-band raster.
Feels little bit strange that bug is reported for ArcGIS Desktop only and also that it's already been a year since the bug was reported for the first time.
Thank you for your answer tho. I had a look at alternate solutions but as I mentioned above, I want to extract data from multidimensional raster, because it is way faster than generating 5 000 singleband rasters, merging them together, nd extracting multidimensional data to points afterwards (this would take like 6 hours of processing time on pretty good setup (tested)).
If your data are already in array format, why don't you use numpy (or alternatives).
I usually have the reverse problem going from rasters to arrays to do things like cell statistics on raster composites.
For example
/blogs/dan_patterson/2018/02/06/cell-statistics-made-easy-raster-data-over-time
If you can't do what you want with netcdf files, getting them into numpy array format might be quicker than dealing with esri rasters or tif files and trying to stack those.
I recently ran into this bug when trying to export a multi-dimensional array (from netCDF) to raster using NumpyArrayToRaster in ArcGIS Desktop 10.8. It is a bit disappointing that the bug was reported in 10.6 and has not been resolved more than 2 years later.
I also tried using this tool in ArcGIS Pro 2.5.0 and found mixed results. When saving to a GeoTiff, the result was a multi-band raster. When saving to GRID format, the tool builds BOTH a multi-band raster AND multiple 1-band rasters.