NEWS | R Documentation |
News for package 'maps'
Changes in maps version 3.4.0 (2021-09-24)
-
legacy_world
andworld.legacy()
, which were deprecated for some years, have been removed from the package. The old database is now available from the companion package 'mapdata' (as of version 2.3.0) where it is called "worldLores". Minor code changes (removal of deprecated macro, small bugfixes)
Some corrections to country, island and city names.
Changes in maps version 3.3.0 (2018-04-03)
-
legacy_world
andworld.legacy()
have been deprecated. The old database is now available from the companion package 'mapdata' (as of version 2.3.0) where it is called "worldLores". Bug fixes:
Makefile has been fixed for possible whitespace in $R_HOME and for pre-existing $AWKPATH.
Various small fixes in data sets.
Changes in maps version 3.2.0 (2017-06-07)
New map wrapping code should eliminate border artefacts on world maps, even with
fill=TRUE
. It can be called viamap(..., wrap=c(0,360),...)
, i.e. by givingwrap
a vector in stead of a boolean value. The wrapping code is also directly available asmap.wrap.poly(data, xlim, poly=FALSE, antarctica=TRUE)
-
map()
has a new argumentlforce
(force limits). Possible values are"n"
(no, default),"e"
(exact limits),"s"
(small enclosed rectangle) and"l"
(large, enclosing rectangle). Forcing the limits will limit your map more forcibly to the given limits."s","l"
only impact the plotting window, but with"e"
the data itself is clipped exactly to the borders. The clipping code is also directly available asmap.clip.poly(data, xlim=NULL, ylim=NULL, poly=FALSE)
. Bug fixes:
All functions should now work if the package is not attached. So you can do
maps::map()
and evenmaps::map("mapdata::worldHires")
A long standing bug in map.where() was fixed. It probably only showed up with the "county" database (and only for about 20 counties in Missouri). The C code has also been optimised.
map() could have problems if
regions
was a factor rather than a character vector.Minor correction to
us.cities
.Fixed some duplicated region names in
italy
map.The return value of
SpatialPolygons2map()
now has classmap
.-
county.fips
andcounty.state
: changed from factors to character vectors.
Minor changes:
The C functions are now registered.
-
maptype()
always returned"spherical"
for external databases. Now it is possible to add amaptype
manually, e.g.mymap$maptype <- "planar"
. When using projections,
map()
now checks for the availability ofmapproj
and gives a nicer message if it isn't available.
Changes in maps version 3.1.1 (2016-07-19)
perl style regex caused problems for very long lists of regions. Fixed by setting perl=FALSE if the list of regions contains more than 1000 entries or the resulting regex is more than 30000 characters long.
A few minor corrections to country and city names.
Removed start-up message.
Changes in maps version 3.1.0 (2016-01-19)
'world' database changed to version without lakes punched out at the borders. The previous version still had various issues, so this is much cleaner. Now 'interior=FALSE' actually works on the whole world map.
Major lakes are now available from a separate database 'lakes'.
Basic support for 'SpatialPolygons' and 'SpatialLines' class objects as map database. Internally,
maps()
calls new functionsSpatialPolygons2map()
andSpatialLines2map()
which transform to the simple 'maps' format, but only the polygon names and coordinates themselves. All other information (holes, plotting order etc.) is ignored.'world2' (the pacific centered map) now has clean cut polygons at the boundaries, so there are no more artefacts when e.g.
fill=TRUE
.map() now (silently) ignores thinning (
resolution>0
) when drawing polygons in stead of polylines. This was already the case for list-based maps, but not forfill=TRUE
. The assymetric thinning caused artefacts. Plotting may be a bit slower now, noticably so for 'worldHires'. But usually you don't want to plot a complete world map at such a high resolution anyway.-
wrap=TRUE
is no longer ignored whenplot=FALSE
. Also, wrapping is now called before thinning, which should give slightly better results. Technical:
removed $(AWK) macro from Makefile and added simple configuration script.
maps:::subgroup adapted to be much faster. Very noticable when selecting a large subset of polygons from a polygon database (not file-based).
Improved
map.wrap()
for wrapping around the globe. The new version fixes some bugs, is a bit faster and also adds an option for maps not centered around 0.
Changes in maps version 3.0.2 (2016-01-04)
World database rebuilt using mapMaker. Some corrections to polylines.
Added the lakes on country boundaries as new polygons. That way, the dissappear when plotting with map(..., fill=TRUE) and map(..., interior=FALSE).
Minor changes to man pages.
Changes in maps version 3.0.1 (2015-11-30)
Fix match.map() for world map
Add some more island names to the world database
Updated a few web references in man pages.
Changes in maps version 3.0.0 (2015-09-24)
MAJOR:
New 'world' database, taken from the public domain "Natural Earth" project. Many new countries have appeared since 1990. E.g.
map(region="USSR")
will no longer work.The old map is still available as 'legacy_world'. It is also possible (during a transition period) to switch completely to the old database by giving the command
world.legacy(TRUE)
or even by setting the environment variable 'R_MAP_DATA_LEGACY=TRUE' prior to loading the package.
ADDITIONS:
data set
iso3166
containing ISO-3166 country codes.New functions
iso.expand()
,sov.expand()
andiso.alpha()
that use this table for converting country names to ISO codes or back. Also expansion by sovereignty. Could be used e.g. for country labels.
SMALL CHANGES & FIXES
Internally now uses perl-style regular expressions. Useful for e.g. 'negative' regular expressions:
-
"Norway(?!:Svalbard)"
means Norway and all islands except Svalbard. -
map(reg="(?!Belgium)", fill=TRUE, xlim=c(-10,20), ylim=c(40,60))
-
map.text(...,exact=TRUE) now behaves as documented. To get the old (non-documented) behaviour (plot map with exact=FALSE, write text for exact=TRUE) you could now use 2 commands:
-
map(...,exact=FALSE)
-
map.text(...,exact=TRUE,add=TRUE)
-
match.map had a potential bug with locale-dependent behaviour of
order()
.