필터 지우기
필터 지우기

How to make tif output file with Coordinate Reference System (CRS)?

조회 수: 5 (최근 30일)
Rafat
Rafat 2023년 11월 6일
편집: Rafat 2023년 11월 6일
Hello,
I am working on tif files to produce the median matrix for them, I am using the following cod for that.
How I can make the output as .tif with keep the coordinate refrence system (CRS)?
unzip Test3.zip
% Warning: Cannot open file "" for reading.
files = dir('*.tif');
filenames = fullfile({files.folder},{files.name});
N = numel(files);
sz = zeros(N,2);
for ii = 1:N
files(ii).data = imread(filenames{ii});
sz(ii,:) = size(files(ii).data);
end
datablock = cat(3, files.data);
image_median = median(datablock, 3, 'omitnan');
[min(image_median(:)), max(image_median(:))]
image(image_median)

답변 (1개)

Walter Roberson
Walter Roberson 2023년 11월 6일
Make sure the CRS is a "map raster reference object" and use geotiffwrite from the Mapping Toolbox.
  댓글 수: 1
Rafat
Rafat 2023년 11월 6일
Hello Walter,
Many thanks for that, but I am beginner on that, it's not easy for me!! sorry.
Cheers

댓글을 달려면 로그인하십시오.

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by