필터 지우기
필터 지우기

Why Spatial referencing information is missing or not readable directly from ENVI format data?

조회 수: 4 (최근 30일)
I have created ENVI formatted data along with its header file. I can open it in ENVI software and even extracted the data using shape file manually. However, when I tried to extract the data using same shape file from MATLAB code given below;
[img, R] = readgeoraster(img_file.name);
% Verify if R contains the necessary spatial referencing information
if isempty(R)
error('Spatial referencing information is missing or not readable directly.');
end
It gives following error
Spatial referencing information is missing or not readable directly
I am attaching the ENVI header file and request you to please suggest me how to use it.
Chahar

답변 (1개)

Cris LaPierre
Cris LaPierre 2024년 5월 8일
편집: Cris LaPierre 2024년 5월 8일
After hearing from the corresponding internal team, it was discovered that the map info parameter in your headerfile is not formatted correctly for UTM projection data. Replace it with the following:
map info = {UTM, 0.500000, 0.500000, 712580.000000, 3216500.000000, 20.000000, 20.000000, 43, north, WGS-84, units=Meters}
You can then load and view your data using code similar to this:
[A, R] = readgeoraster("Bagpat_20230613T052649_7Bands.dat");
mapshow(rescale(A(:,:,[3 2 1])),R)
  댓글 수: 3
Cris LaPierre
Cris LaPierre 2024년 5월 9일
편집: Cris LaPierre 2024년 5월 9일
Please ask a new question, as that is a different topic from this one. Consider zipping and sharing the shapeful file when you do so people can help. You also seem to be using a different dat file. It would be helpufl to share that, too.
Include any error messages you are getting, what specific data you want to extract, etc
Your code looks very similar to what was answered in this post, so perhaps start by looking there?
gauri
gauri 2024년 5월 9일
I have posted a new question as follows;
https://in.mathworks.com/matlabcentral/answers/2116911-how-do-i-extract-the-multiband-data-using-shape-file

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

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by