How do I create a custom basemap from locally stored data for offline use? Or add color to geoglobe?

28 views (last 30 days)
I have attempted each of the below methods to save or add data to my geoglobe UIFigure. The end goal is to have locally-saved data to have the satellite or colorterrain basemaps usable in offline runs. Or, I could use a .tif or .mbtiles file if that also can be added to a geoglobe figure.
Help Page that should address this exact issue (but I had no success): Use Basemaps in Offline Environments - MATLAB & Simulink (mathworks.com)
Data Sources:
> I was able to pull these pictures 1-by-1 into a file structure similar to the default basemap ('darkwater') that is preinstalled with MatLab. But the addCustomBasemap() function searches the web and edits my filepath to be a url with 'https://'.
colorterrain | https://ssd.mathworks.com/supportfiles/mapdata/maptiles/NaturalEarth/colorterrain/v1/
Other earth .mbtiles file
End:
Any help is appreciated - even consolation options to simply add some color to improve the figures using darkwater.

Answers (1)

Siraj
Siraj on 20 Sep 2023
Hi!
It seems that you want to customize the basemaps or add colour to the geoglobe even without an internet connection. You mentioned using the "addCustomBasemap()" function to add a custom file you have. However, you're facing an issue where the function treats the file path as a URL with 'https://' because the file extension is not ".mbtiles". As a result, the "addCustomBasemap()" function cannot be used in this case.
This can also be verified with the help of the following code:
basemapName = "customMap";
mbtilesFilename1 = "usgsimagery.mbtiles";
mbtilesFilename2 = "usgsimagery.tiff";
addCustomBasemap(basemapName, mbtilesFilename1) % This line tries to add the basemap using the "usgsimagery.mbtiles" file. It does not give any warning, indicating a successful addition.
addCustomBasemap(basemapName, mbtilesFilename2) % This line attempts to add the basemap using the "usgsimagery.tiff" file. However, it results in a "Download failed" error, suggesting that the function is treating the file as a URL instead of a local file.
Note that you can use a GeoTIFF file or a ".shp" (shapefile) to create a basemap in GeoGlobe. These file formats are supported and can be utilized as custom basemaps. For more detailed information and guidance on how to use GeoTIFF files or shapefiles as basemaps, you can refer to the following link:
You can explore the "geobasemap" function to determine if it can be utilized to set the basemap for "geoglobe" by accessing the geographic axes of the globe. You can find more information about the "geobasemap" function in the attached link:
If you are looking for suggestions on how to improve the colours of the "darkwater" basemap, you can refer to the provided link. It may offer potential solutions or workarounds that could help you achieve the desired colour scheme for the basemap.
If you want to enhance the responsiveness of maps or work offline, you have the option to download basemaps generated using Natural Earth onto your local system. Please note that you cannot download basemaps provided by Esri. To access the link for downloading and working offline with maps, refer to the following link:
Hope this helps.

Categories

Find more on Geographic Plots in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!