How to get map information from jp2 images ?

1 view (last 30 days)
Devendra
Devendra on 20 Apr 2024
Answered: Walter Roberson on 21 Apr 2024
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

Answers (1)

Walter Roberson
Walter Roberson on 21 Apr 2024
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

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!