AnsweredAssumed Answered

ArcPy NumPyArrayToRaster not working properly (Python)

Question asked by franko14 on Aug 1, 2019
Latest reply on Aug 1, 2019 by Dan_Patterson

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

Outcomes