How to get map information from jp2 images ?

1 次查看(过去 30 天)
I am using following matlab lines to layer stack 6 bands(green,red,nir,rededge5,rededge6,rededge7) of sentinel2 satellite data. I have resampled 10m resolution bands to 20m resolution and successfully writen envi file with header. However, map information like map projection is missing from header file. Please suggest me how to get map information from jp2 formated files into envi header files?
data = imresize(img ,[5490 5490]);
I will appreciate your kind cooperation.
Devendra

回答(1 个)

Walter Roberson
Walter Roberson 2024-4-21
You need to run an external program that reads EXIF information from the file... and hope that the information is recorded in the EXIF tags.
However, MATLAB does not support writing coordinate system string (see https://www.nv5geospatialsoftware.com/docs/enviheaderfiles.html for the description). You will need to do something like get https://github.com/akayasse/ENVI-read-and-write-for-MATLAB/blob/master/enviwrite.m and modify it to support writing coordinate system string

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by