Mapping a raster with latitude and longitude coordinates

1 回表示 (過去 30 日間)
Peter Dorofy
Peter Dorofy 2015 年 8 月 6 日
編集済み: Peter Dorofy 2015 年 8 月 13 日
I have a satellite image file (2034x1354) where I pulled out reflectance values,latitude,longitude coordinates. I am having a difficult time trying to display/map this image. I have done research online and still cannot figure it out.
Here are the results:
Ref = 2030x1354 single
latitude = 2030x1354 single
longitude = 2030x1354 single
and reshaped to Vectors:
vRef = 1x2748620 single
vLat = 1x2748620 single
vLon = 1x2748620 single
I have tried:
[latgrid,longrid] = meshgrid(latitude,longitude)
geoshow = (latgrid,longrid,Ref,'DisplayType','texturemap')
Not surprisingly, I get an error "Requested 2748620x2748620 (28144.2GB) array exceeds maximum..."
Any ideas?
Thanks

採用された回答

Walter Roberson
Walter Roberson 2015 年 8 月 7 日
I would expect
geoshow(latitude, longitude, Ref, 'DisplayType', 'texturemap')
  2 件のコメント
Rob Comer
Rob Comer 2015 年 8 月 9 日
I agree. There's no need to call meshgrid, because your 2D latitude-longitude arrays already constitute a mesh. Skipping this step will eliminate the latgrid and longrid arrays. That's good, because even if they fit in memory, these arrays would be both enormous and ill-formed.
Peter Dorofy
Peter Dorofy 2015 年 8 月 13 日
編集済み: Peter Dorofy 2015 年 8 月 13 日
Thanks everyone. Walter that worked. I actually did this before I posted, but it was not working. Probably because I did not save the script before executing.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by