How to specify geotiff coordinate if the RefMatrix is empty?
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I would like to know how I can visualize and extract the lat-lon information from my geotiff file. When I use the geotiffinfo, it appears that my file coordinate are from 0 to 360 degrees since I opened in ArcGIS and the extent are Top: 19.10, Right: 283.72, Bottom: 6.82 and left: 267.35. I would like to extract the lat and long values in the other format (e.g. -92.64, 6.82)
Additionally, the RefMatrix variable in the Geotiffinfo function appears empty.
The geotiff file is attached in this question
0 件のコメント
採用された回答
KSSV
2018 年 9 月 5 日
tiffile = 'lluvia_15.tif' ;
[A, R] = geotiffread(tiffile);
[nx,ny] = size(A) ;
S = geotiffinfo(tiffile) ;
L = S.GeoTIFFTags.ModelTiepointTag ;
lons = L(:,4) ; lats = L(:,5) ;
min_lon = min(lons) ; max_lon = max(lons) ;
min_lat = min(lats) ; max_lat = max(lats) ;
image([min_lon max_lon],[min_lat max_lat],A)
3 件のコメント
KSSV
2018 年 9 月 6 日
dx = (max_lon-min_lon)/(nx-1) ;
dy = (max_lat-min_lat)/(ny-1) ;
x = min_lon:dx:max_lon ;
y = min_lat:dy:max_lat ;
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!