Extracting latitude/longitude metadata from LANDSAT Earth Explorer
Mostra commenti meno recenti
I am just starting to use MATLAB. My assignment for work is to calculate the mean of a surface temperature matrix for each cell with dimensions 1 degree latitude by 1 degree longitude. I downloaded, read, converted data types, and calculated the mean of the surface temperature matrix.
My issue is with reading latitude/longitude data as an array/matrix. I found the latitude/longitude data for a tile in its metadata and downloaded its metadata as an xml and html file. I'm not sure what the steps are for reading it into MATLAB, though. Here is the latitude/longitude data I want to convert into a matrix:
<CORNER_UL_LAT_PRODUCT>39.23687</CORNER_UL_LAT_PRODUCT>
<CORNER_UL_LON_PRODUCT>-103.19598</CORNER_UL_LON_PRODUCT>
<CORNER_LR_LAT_PRODUCT>37.81339</CORNER_LR_LAT_PRODUCT>
<CORNER_LR_LON_PRODUCT>-101.34833</CORNER_LR_LON_PRODUCT>
<CORNER_UL_PROJECTION_X_PRODUCT>-615585.000</CORNER_UL_PROJECTION_X_PRODUCT>
<CORNER_UL_PROJECTION_Y_PRODUCT>1814805.000</CORNER_UL_PROJECTION_Y_PRODUCT>
<CORNER_LR_PROJECTION_X_PRODUCT>-465585.000</CORNER_LR_PROJECTION_X_PRODUCT>
<CORNER_LR_PROJECTION_Y_PRODUCT>1664805.000</CORNER_LR_PROJECTION_Y_PRODUCT>
I tried parsexml('filename') and xmlread('filename') on the xml file of the metadata, and I tried extractHTMLtext('filename'), but I got "Invalid expression" errors. I'm not sure what to do.
Let me know if anything I said was unclear or if you have advice!
2 Commenti
Kojiro Saito
il 26 Mag 2022
Could you tell us the detail of Landsat products (Landsat Legacy? or Landsat Collections)? Not every product has .xml and .html file, some contain only .txt files.
Eric Williams
il 26 Mag 2022
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Map Display in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!