Error in Mapping Toolbox when trying to 'geoshow' a country with too many points
10 views (last 30 days)
Show older comments
I pulled a shape file from naturalearthdata.com for all the countries in the world. I can plot the lower resolution countries fine on a world map, but the highest resolution set of countries throws up an error with any countries larger than Australia or Greenland. The entire error is attached in an image, but the main error is:
"Error using adjustPolarVertices>adjustPV (line 73) 724 polar vertices: Too many."
I tried looking around for what the problem is, and all I found was that it has something to do with too many points for matlab to assemble a closed polygon?
Does anyone know how to resolve this error or any other workarounds? I would use the lower res maps but I need the higher res one for the project I'm working on.
Also this is the exact code that I am inputting:
map_countrie
shaperead('ne_10m_admin_0_countries.shp', 'UseGeoCoords', true);
geoshow(map_countries)
0 Comments
Answers (1)
Mathieu Clerte
on 9 Jan 2020
This shape file does not have consistent polygons. You should instead use something like the GSSH files (from NOAA).
Check this tutorial , it works well :
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!