Spatial Modeler Discussions

Gain, exchange, and share knowledge, or discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of Hexagon Geospatial products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
New Contributor
Posts: 2
Registered: ‎12-03-2019
Accepted Solution

Error: calloc could not allocate space for Egda_BaseData data

[ Edited ]

Running 10m raster through spatial model to downsample 10m to 30m resolution. The new raster has not attribute table and I get this error message..

 

Error: calloc could not allocate space for Egda_BaseData data

 

..and the new raster does not display at any extent. Computing pyramid layers and calculating statistics does not fix the issue. Here is the model.resample_NN.PNG

Highlighted
Technical Evangelist
Posts: 888
Registered: ‎10-01-2015

Re: Error: calloc could not allocate space for Egda_BaseData data

Hi mashwa,

 

What did you initialize your Custom Matrix with? All 1s?

 

Is the Raster Input a thematic image? If so, Focal Mean may not be what you want to use to degrade the resolution. 

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
New Contributor
Posts: 2
Registered: ‎12-03-2019

Re: Error: calloc could not allocate space for Egda_BaseData data

Thanks Ian, I (attempted) to base this simplified model on your more complex Raster Generalization model (which works great on my data). 

 

The input is a continuous 1 band "percent surface" layer with the matrix set as 3x3 cell.

 

If I use the model maker tool to run focal mean with a 3x3 matrix and then send that output to the built-in resampling tool and do a NN resample to 30mx30m, I have no issues. 

 

The issue arises when I try to streamline the process  and run a similar model in the Spatial Model Editor. Like I said when I run it through your Raster Generalization model it works fine, just trying to troubleshoot what the issue is with this more simple model. 

 

I'm thinking the issue is that I made the Custom Matrix as 3x3 but I populated it with all zeros. I am out of the office now but will see if populating with all 1s solves the issue tomorrow.

 

Thanks for the feedback!

Highlighted
Technical Evangelist
Posts: 888
Registered: ‎10-01-2015

Re: Error: calloc could not allocate space for Egda_BaseData data

Yes - you aren't going to get any results if your focus matrix is populated with 0s. 

 

A 0 indicates that a cell within the n x m array should not be considered. So if all the cells are 0 then none of the input pixel values will be considered in the Focal Mean operation. Populate the matrix with 1s and see if that addresses the issue.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial