Mapping toolbox. converting asc to tiff file i get NaN values
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi to all,
i'm trying to convert a .asc file (column matrix) to a .tif file (reshaping it) using Mapping Toolbox. I already used this code without problems but now it create a .tiff file (to open with ArcGIS ) with all values corresponding to NaN (the value is: -3.40282346639e+38 and correspond to matrix NaNvalue in the code). I don't understand how to fix the problem. I got any error. I attached the .asc file here.
This is my code:
%% load data
inRoot = 'Ascii_out';
Dat1 = csvread(strcat(inRoot,'/','Idx_NaN.asc'));
Dat2 = csvread(strcat(inRoot,'/','Rv_median.asc'));
%% setting
NaNvalue = -3.40282346639e+38;
Xcor = 1557274.88066;
Ycor = 4920154;
CellSize = 100;
rowR = 701;
colR = 1014;
%% EXPORT RV MEDIAN MAP
DATA = Dat2; %definisce la colonna da cui esportare i dati
NaNidx = Dat1;
row = rowR;
col = colR;
RunVec = 2; %numero di test
Run = strcat(num2str(RunVec)); %run
PCtime = clock;
Date = strcat(num2str(PCtime(1)),num2str(PCtime(2)),...
num2str(PCtime(3)),'_',num2str(PCtime(4)),...
num2str(PCtime(5)));
Path = strcat('output/maps/');
Root = strcat('MAC_c1_100m',Run);
OutName ={'_Rv_median'};
OutNameCod =''; %'Rcl_'
flg1 = 2;
FXMapExport(DATA,NaNidx,row,col,NaNvalue,Xcor,Ycor,CellSize,Path,...
Root,OutName,OutNameCod,flg1);
Thanks in advance for any help, it is really important.
0 Kommentare
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!