DataSets[Builtin][WorldMap] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

DataSets[Builtin][WorldMap]

  

Project

  

project longitude-latitude pairs to different projections

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Project(x,y,opts)

Project(xy,opts)

Parameters

x

-

a longitude value between -180 and 180

y

-

a latitude value between -90 and 90

xy

-

an n by 2 Array or Matrix, or a list of n lists each consisting of 2 numbers: the input points

opts

-

(optional) equation(s) of the form projection=proj or mode=m, where proj is one of the projections in List of Projections and m is one of point, points, curve, or polygon

Description

• 

The Project command applies the specified projection to the set of input points.

• 

For the first calling sequence, unless projection=Globe, this command returns a two element list of the projected x and y coordinates.

• 

If projection=Globe, a three element list of the projected x, y, and z coordinates is returned.

• 

For the second calling sequence, a list of lists is returned if the input is a list of lists. Otherwise, a Matrix is returned.

• 

The projection option determines which projection is used. The default is the Geographic projection.

• 

If projection=Globe, then the mode option is ignored. Otherwise:

– 

If mode=points (the default value), then each input point is projected and one corresponding output point is returned.

– 

The option mode=point is a synonym for mode=points.

– 

If mode=curve, then the n input points are interpreted as describing a sequence of n1 line segments between these points in the Geographic projection. In order to draw the same curve in the given projection, it may not suffice to just project the input points and draw straight line segments between them. Using the mode=curve option instructs Maple to insert extra points in between the original input points to remedy this.

– 

If mode=polygon, then the same process as for mode=curve is followed, but any points projected to coordinates that evaluate to non-numeric values (i.e., positive or negative infinity, or undefined) to be removed from the end result.

• 

Unlike most other commands in the WorldMap package, this command does not operate on a WorldMap object.

• 

For a large number of points, it is more efficient to use the second form of the command than projecting each point separately.

Examples

The Mercator projection diverges at the poles.

DataSets:-Builtin:-WorldMap:-Project0,90,projection=Mercator

0.,Float-

(1)

XStatistics:-SampleUniform180,180,5000:

YStatistics:-SampleUniform1,1,5000:

Y`~``-``~`arccosY180π,` $`,90:

ptsseqXi,Yi,i=1..5000:

pptsDataSets:-Builtin:-WorldMap:-Projectpts,projection=Bonne:

plots:-displayplottools:-pointppts

The line segment connecting the following two points in the geographic projection runs through the Sahara desert.

x190,10

x1−90,10

(2)

x270,30

x270,30

(3)

inputx1,x2

input−90,10,70,30

(4)

mDataSets:-Builtin:-WorldMap:

plots:-displayDisplaym,plottools:-curveinput

But in the Bonne projection, the line segment runs through Ireland.

outputDataSets:-Builtin:-WorldMap:-Projectinput,projection=Bonne

output−1.31989493325449,0.0765476835245464,0.938346490412134,0.156410313611208

(5)

plots:-displayDisplaym,projection=Bonne,plottools:-curveoutput

To get a faithful projection of the line segment, we can use the mode=curve option. This inserts a number of extra points into the result.

output2DataSets:-Builtin:-WorldMap:-Projectinput,projection=Bonne,mode=curve

output2−1.31989493325449,0.0765476835245464,−1.29256326783059,0.0478314496886835,−1.26448054378988,0.0197188498060384,−1.23565803298054,−0.00776402479505300,−1.20610799727771,−0.0345912350898463,−1.17584369277183,−0.0607370320970162,−1.14487937249012,−0.0861758952402840,−1.11323028760505,−0.110882571275687,−1.08091268708605,−0.134832113725395,−1.04794381575225,−0.157999922756107,−1.01434191068702,−0.180361785437272,−0.980126195976903,−0.201893916311600,−0.945316875740763,−0.222572998207730,−0.909935125417463,−0.242376223222316,−0.874003081283474,−0.261281333796375,−0.837543828175043,−0.279266663808369,−0.800581385392824,−0.296311179604319,−0.763140690770379,−0.312394520883138,−0.725247582891611,−0.327497041353458,−0.686928781445975,−0.341599849076466,−0.648211865714256,−0.354684846407619,−0.609125251181761,−0.366734769448737,−0.569698164279988,−0.377733226920688,−0.529960615262143,−0.387664738365863,−0.489943369222299,−0.396514771588787,−0.449677915272525,−0.404269779242610,−0.409196433896948,−0.410917234468807,−0.368531762506372,−0.416445665497265,−0.327717359221894,−0.420844689113989,−0.286787264920744,−0.424105042904013,−0.245776063582448,−0.426218616177633,−0.204718840978353,−0.427178479488943,−0.163651141752392,−0.426978912656734,−0.122608924945969,−0.425615431199179,−0.0816285180246800,−0.423084811095352,−0.0407465694695173,−0.419385111788565,0.,−0.414515697348653,0.0405740474985149,−0.408477255712818,0.0809382592664034,−0.401271815927384,0.121055203098666,−0.392902763315813,0.160887381825075,−0.383374852501643,0.200397287751122,−0.372694218218555,0.239547457965078,−0.360868383843608,0.278300530412376,−0.347906267593791,0.316619300634618,−0.333818186330383,0.354466779066786,−0.318615856920217,0.391806248782705,−0.302312395107810,0.428601323575518,−0.284922311857386,0.464816006256864,−0.266461507129149,0.500414747055641,−0.246947261059687,0.535362501994694,−0.226398222522116,0.569624791121508,−0.204834395047472,0.603167756467013,−0.182277120095026,0.635958219604960,−0.158749057665351,0.667963738682970,−0.134274164256478,0.699152664795367,−0.108877668169945,0.729494197567248,−0.0825860421802103,0.758958439818882,−0.0554269735876578,0.787516451179659,−0.0274293316822001,0.815140300521130,0.00137686734860754,0.841803117079558,0.0309604980261510,0.867479140139492,0.0612893656543250,0.892143767151502,0.0923302488054544,0.915773600159084,0.124048944157070,0.938346490412134,0.156410313611208

(6)

plots:-displayDisplaym,projection=Bonne,plottools:-curveoutput2

Compatibility

• 

The DataSets[Builtin][WorldMap][Project] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

• 

The DataSets[Builtin][WorldMap][Project] command was updated in Maple 2019.

See Also

List of Projections

WorldMap