Borrar filtros
Borrar filtros

Trouble using readgeoraster and mapshow

6 visualizaciones (últimos 30 días)
Michael Pietruschka
Michael Pietruschka el 4 de Ag. de 2020
Respondida: Gaurav Garg el 13 de Ag. de 2020
I#m trying to figure out how to work with tif files in Matlab. I tried following this example:
But when I try executing this code:
[A,R,cmap] = readgeoraster('U2012_CLC2006_V2020_20u1.tif');
geoshow(A,cmap,R)
I get this Error Message
Error using repmat
Requested 46000x65000x3 (8.4GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive.
Error in checkImage (line 39)
A = repmat(A,[1 1 3]);
Error in validateTextureComponent (line 70)
dataArgs{imageIndex} = checkImage( ...
Error in validateGeoRasterData (line 23)
[dataArgs, R, imageIndex, rules] = validateTextureComponent( ...
Error in georastershow (line 144)
validateGeoRasterData('geoshow', dataArgs, displayType);
Error in geoshow (line 242)
h = showFcn(varargin{:});
Error in tif (line 6)
geoshow(A,cmap,R)
What should I do to fix this error? Is the file simply too big?

Respuestas (1)

Gaurav Garg
Gaurav Garg el 13 de Ag. de 2020
Hey Michael,
You can specify the size of maximum array under 'Preferences'.
Kindly refer to the doc here to do so.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by