Issues running basic geoshow examples from the Mapping Toolbox
11 views (last 30 days)
Show older comments
I am having trouble running some of the basic examples from the Matlab Mapping toolbox
Here is an example straight from the documentation. Using the online run command, it runs no problem.
landAreas = readgeotable("landareas.shp");
row = landAreas.Name == "Africa and Eurasia";
landAreasSubset = landAreas(row,:);
landAreasSubset.Shape
worldmap([-45 80],[-25 195]);
geoshow(landAreasSubset)
However when I run it locally this is what I get:
Error using geoshow
Expected S to be one of these types:
geopoint, mappoint, geoshape, mapshape
Instead its type was table.
Error in geovectorshow (line 93)
validateattributes(S, {'geopoint', 'mappoint', 'geoshape','mapshape'}, ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in geoshow (line 274)
h = showFcn(varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in test (line 16)
geoshow(landAreasSubset)
^^^^^^^^^^^^^^^^^^^^^^^^
I am getting all sorts of errors on geoshow for other simple scripts.
I am running MATLAB 2014b on Apple Silicone. I have re-installed MATLAB completely to check if it's some issue with the Mapping toolbox
2 Comments
Steve Eddins
on 7 Feb 2025
You said that you are running MATLAB R2014b. Is that correct? I wouldn't expect that version to get past the call to readgeotable, which wasn't added until R2021b.
If that was a typo, and you are really running a recent version of MATLAB and Mapping Toolbox, then I suspect you are unintentionally calling an old version of geoshow. Try this to see what you have:
>> which -all geoshow
Accepted Answer
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!