Why Spatial referencing information is missing or not readable directly from ENVI format data?
6 ビュー (過去 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
0 件のコメント
回答 (1 件)
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
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
参考
カテゴリ
Help Center および File Exchange で Data Import and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!