maps

###R package for geographical maps

This is version 3 of the maps package. The main change with respect to v2 is a more recent world map. The old map legacy map is still available from the package mapdata.

##CHANGES

##ADDITIONS

##FIXES - As of v3.2, maps::map() also works if the maps package is not attached. You can even do maps::map(“madata::worldHires”). - As of v3.1, map(…, fill=TRUE) no longer applies thinning. This removes small artefacts, but plotting worldHires becomes rather slow, should you ever want to plot a full world map at such a high resolution. - map.text(…, exact=TRUE) now behaves as documented. Previously, the “exact=TRUE” was not passed to the map drawing if add=FALSE. To get the old (non-documented) behaviour (plot map with exact=FALSE, write text for exact=TRUE) you should now use 2 commands: * > map(…, exact=FALSE) * > map.text(…, exact=TRUE, add=TRUE) - match.map now works correctly for regions containing “:”. This was potentially broken due to locale-dependent behaviour of order(). - ‘world2’ now has clean boundaries when ‘fill=TRUE’.

##FALL BACK TO LEGACY WORLD DATABASE The old map data set has been moved to the ‘mapdata’ package, where it is called “worldLores”. It can thus be called via map(“mapdata::worldLores”).

Note that the worldHires database from the mapdata package has identical map naming than the legacy world map. The only difference is in the resolution of the polylines. That high resolution version of the legacy map will remain unchanged.

Please inform the maintainer of any problem that requires a fallback to the legacy database!

HIGH RESOLUTION AND OTHER MAPS

Natural Earth also supports a high-resolution (1:10m) world map. Rather than replacing ‘worldHires’ (in the mapdata package), this data set can be imported into maps e.g. by loading the “rnaturalearth” package.

Even maps in e.g. shapefile format can now easily be imported for use in ‘map()’. For instance the package ‘maptools’ offers the function ‘readShapePoly()’, which reads a shapefile into a ‘SpatialPolygonsDataFrame’ that can be used as a map database (as of version 3.1).

##TO DO/DISCUSS: - Add ‘proj4’ support. This will have to be via a new argument e.g. . - Many islands remain nameless. - The old naming convention is largely maintained, but some choices are different. The changes mean that e.g. /region=“France”/ now covers only metropolitan France, whithout (most of) the overseas departments and territories - Some inconsistencies in the naming procedure remain. For instance, while most countries are named by their full name, “UK” and “USA” are shortened in the same way as in the old data base. For UK, this even required a hack in the mapping code to avoid adding Ukrain to the map. - The iso3166 table may have to be adapted for the Natural Earth 1:10 database, some extra rows have already been inserted.