 DataSets[Builtin] - Maple Programming Help

Home : Support : Online Help : Statistics and Data Analysis : DataSets Package : Builtin : WorldMap : DataSets/Builtin/WorldMap

DataSets[Builtin]

 WorldMap
 create a WorldMap object

 Calling Sequence WorldMap() WorldMap(ref,option) WorldMap(points,option)

Parameters

 ref - a Reference to the GeoNames dataset points - a list of points where each sublist defines a point by longitude, latitude, and an optional string label option - (optional) keyword option of the form option=value, where option can be limit

Options

 • limit : posint; specifies the maximum number of points that a WorldMap object is allowed to store. By default, the value of limit is 100.

Description

 • The WorldMap command creates a WorldMap object that can be used to display maps of the world in various ways.
 • If no argument is specified, the command returns a WorldMap object with no point stored.
 • If a ref to the GeoNames dataset is given, the WorldMap object created loads all data points in ref.
 • If a nested list of points is given, the WorldMap object created stores all points in the nested list. Each sublist in points must be a list of at least two elements: the first being the longitude (x-coordinate in the Geographic projection) and the second being the latitude (y-coordinate in the Geographic projection). The optional third element is a string label for the point.
 • The longitude must lie in the interval [-180,180], and the latitude must lie in the interval [-90,90].
 • Note that the number of points in both ref and points cannot exceed limit.
 • Here is the list of commands defined for WorldMap objects:

 • The Project command, used to project longitude-latitude pairs to different projections, does not operate on a WorldMap object, unlike most other commands in the WorldMap package.
 • For a list of supported map projections, see the List of Projections help page.

Examples

Create a WorldMap object with no points stored.

 > $m≔\mathrm{DataSets}:-\mathrm{Builtin}:-\mathrm{WorldMap}\left(\right)$
 ${m}{≔}\left(\begin{array}{cc}\left[{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]& \begin{array}{c}{\mathrm{A map of the world}}\\ {\mathrm{projection: MillerCylindrical}}\end{array}\end{array}\right)$ (1)
 > $\mathrm{Display}\left(m\right)$ Create a WorldMap object with three points stored.

 > $\mathrm{m2}≔\mathrm{DataSets}:-\mathrm{Builtin}:-\mathrm{WorldMap}\left(\left[\left[121.5,31.2,"Shanghai"\right],\left[-123.1,49.25,"Vancouver"\right],\left[-118.25,34.05,"Los Angeles"\right]\right]\right)$
 ${\mathrm{m2}}{≔}\left(\begin{array}{cc}\left[{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]& \begin{array}{c}{\mathrm{A map of the world with 3 points}}\\ {\mathrm{projection: MillerCylindrical}}\end{array}\end{array}\right)$ (2)
 > $\mathrm{Display}\left(\mathrm{m2}\right)$ Create a WorldMap object with a GeoNames dataset reference

 > $\mathrm{ref}≔{\mathrm{DataSets}:-\mathrm{Builtin}:-\mathrm{Reference}\left("Geonames"\right)}_{\left[\mathrm{Country}="Canada",\mathrm{Name}="Waterloo"\right]}$
 ${\mathrm{ref}}{≔}\left[\begin{array}{ccccc}{\mathrm{Geonames \left(GeoNamesid\right)}}& {\mathrm{Name}}& {\mathrm{Type}}& {\dots }& {\mathrm{\left(7 more\right)}}\\ {\mathrm{6176821}}& {\mathrm{Waterloo}}& {"populated place"}& {\dots }& {}\\ {\mathrm{6176823}}& {\mathrm{Waterloo}}& {"populated place"}& {\dots }& {}\\ {\mathrm{8673866}}& {\mathrm{Waterloo}}& {"third-order administrative division"}& {\dots }& {}\end{array}\right]$ (3)
 > $\mathrm{m3}≔\mathrm{DataSets}:-\mathrm{Builtin}:-\mathrm{WorldMap}\left(\mathrm{ref}\right)$
 ${\mathrm{m3}}{≔}\left(\begin{array}{cc}\left[{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]& \begin{array}{c}{\mathrm{A map of the world with 3 points}}\\ {\mathrm{projection: MillerCylindrical}}\end{array}\end{array}\right)$ (4)
 > $\mathrm{Display}\left(\mathrm{m3}\right)$ > 

Compatibility

 • The DataSets[Builtin][WorldMap] command was introduced in Maple 2017.