Plot 3D Dome - no topo60c file available
Afficher commentaires plus anciens
I am using the example of how to plot a dome as a mesh over a globe, found here:

It works great, however, I don't have access to the topo60c .mat file (I have looked, including the USGS site). topo60c is not anywhere in my matlabroot, or in the map toolbox examples or elsewhere on my system. So there is no surface texture, just a wire frame.
I found another Matlab example that converts a .jpg file to a .mat file, at this location:
With this, I was able to convert my 1024px-Land_ocean_ice_2048.jpg file to the equivalent .mat file (I think).

I modified the original sample code:
load topo60c
geoshow(topo60c,topo60cR,"DisplayType","texturemap")
to this:
load(image_mat)
geoshow(img_data,"DisplayType","texturemap")
where image_mat is the full path to my 1024px-Land_ocean_ice_2048.mat file.
However, when I try to run this code, I get an error message:
Function UPDATEGEOSTRUCT expected input number 1, S, to be a structure.
I can find the coastlines and rivers .mat data, and they load and display successfully.
When I compare the coastlines .mat file and my texturemap .mat file, I notice some differences. Opening coastlines.mat with Matlab, the Import Wizard reveals two structures:
Name Size Bytes Class
coastlat 9865x1 78920 double
coastlon 9865x1 78920 double
My texturemap file looks like this:
Name Size Bytes Class
img_data 1024x2048x3 6291456 uint8
img.data sure looks like a structure to me. What am I missing? Is the uint8 an issue?
I would rather use my texture map, since it is much higher resolution than topo60c.
6 commentaires
Kurt
le 11 Déc 2023
Cris LaPierre
le 11 Déc 2023
Déplacé(e) : Cris LaPierre
le 12 Déc 2023
You need to open the example locally in order to have access to the mat file. Use the following command:
openExample('map/mapex3ddome')
Kurt
le 11 Déc 2023
Déplacé(e) : Cris LaPierre
le 12 Déc 2023
Cris LaPierre
le 11 Déc 2023
Déplacé(e) : Cris LaPierre
le 12 Déc 2023
Can you save the file to a thumbdrive on a computer that is on the internet?
Kurt
le 12 Déc 2023
Déplacé(e) : Cris LaPierre
le 12 Déc 2023
Cris LaPierre
le 12 Déc 2023
Déplacé(e) : Cris LaPierre
le 12 Déc 2023
As a longer-term solution, you could also ask your institution to install the documentation. This will give you access to the demo files locally.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Vector and Raster Map Display dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!