rspatial / geodata

download geographic data
GNU General Public License v3.0
147 stars 15 forks source link

World maps with different countries at different resolutions #35

Open plantarum opened 1 year ago

plantarum commented 1 year ago

Hi,

I've used world() to download world maps at all five different resolutions. I notice that the countries available are different with each resolution. There are 252 polygons at resolution 2:

> w2
 class       : SpatVector 
 geometry    : polygons 
 dimensions  : 252, 2  (geometries, attributes)
 extent      : -180, 180, -90, 83.65833  (xmin, xmax, ymin, ymax)
 coord. ref. : +proj=longlat +datum=WGS84 +no_defs 
 names       : GID_0      NAME_0
 type        : <chr>       <chr>
 values      :   ABW       Aruba
                 AFG Afghanistan
                 AGO      Angola

But only 231 at the highest resolution. In particular, the following countries are missing:

> w2$NAME_0[! w2$NAME_0 %in% w1$NAME_0]
[1] "Gibraltar"                           
[2] "Monaco"                              
[3] "Maldives"                            
[4] "Marshall Islands"                    
[5] "Tuvalu"                              
[6] "United States Minor Outlying Islands"
[7] "Paracel Islands"

I checked the polygons, and Gibraltar isn't subsumed within Spain, it's just missing from the resolution = 1 map. It would make sense if the highest resolution maps included some countries that were too small to represent in the lower resolution layers, but this seems to be the opposite - shouldn't everything that appears in the second highest resolution map also appear in the highest resolution map?

I'm not sure if this is a geodata issue, or something upstream at GADM?