GeoTIFFを読み込めない
8 views (last 30 days)
Show older comments
こんにちは。
GeoTIFFを読み込み、地図を表示させたいのですが、エラーになってしまいます。
どうしたらよいでしょうか?
[A,R] = readgeoraster("Dynamic Surface.tif");
mapshow(A,R)

0 Comments
Accepted Answer
Kojiro Saito
on 30 Sep 2021
GeoTIFF画像の座標系が地理座標系か投影座標系で使う表示用の関数が変わります。
readgeorasterの第2出力(R)がMapCellsReferenceとかMapPostingsReferenceという投影座標系ではmapshowを使います。
例えばドキュメントの例にあるboston.tifは投影座標系の画像です。
[A,R] = readgeoraster('boston.tif');
whos R
mapshow(A,R)
一方でRが GeographicCellsReferenceやGeographicPostingsReferenceの場合はgeoshowで可視化できます。
[A2,R2] = readgeoraster('n39_w106_3arc_v2.dt1','OutputType','double');
whos R2
latlim = R2.LatitudeLimits;
lonlim = R2.LongitudeLimits;
figure
usamap(latlim,lonlim)
geoshow(A2,R2,'DisplayType','surface')
demcmap(A2)
mapshowで出ているエラーから推測すると、お使いのデータの座標系(R)がMap**の投影座標系になっていないと思われます。
Geographic**の座標系になっていたら、geoshowをお使いになってはいかがでしょうか。
More Answers (0)
See Also
Categories
Find more on Vector and Raster Map Display in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!