WOLFRAM

GeoGraphics[primitives,options]

represents a two-dimensional geographical image.

Details and Options

Examples

open allclose all

Basic Examples  (7)Summary of the most common use cases

Show a map of the world centered at your location:

Out[1]=1

Display a street map centered on your current location:

Out[1]=1

Draw a polygon showing Italy:

Out[1]=1

Style a geo polygon with graphics directives:

Out[2]=2

Display a map of France and areas around it:

Out[1]=1

Draw a map of Germany only:

Out[1]=1

Plot the world in a Robinson projection:

Out[1]=1

Connect two points on Earth with GeoPath:

Out[2]=2

A map of the area around Olympus Mons on Mars:

Out[1]=1

Scope  (30)Survey of the scope of standard use cases

Primitives  (19)

Plot the US as a geo polygon:

Out[1]=1

Plot the bounding rectangle of the US, with sides being parallels and meridians:

Out[1]=1

Draw a straight line between two cities:

Out[1]=1

Draw a red point at the position of Washington, DC:

Out[1]=1

Show the location of London with a geo marker:

Out[1]=1

Plot a set of styled geo disks using different center specifications:

Out[1]=1

Plot a set of styled geo circles using different center specifications:

Out[1]=1

Color the part of the Earth currently in daylight:

Out[1]=1

Color the part of the Earth currently in darkness:

Out[1]=1

Display the current terminator separating daylight from darkness on the Earth:

Out[1]=1

Show the shortest path (geodesic) between New York and Hong Kong:

Out[1]=1

Plot a random path of 100 geodesic steps:

Out[1]=1

Draw an arrow between two cities:

Out[1]=1

Draw an arrow with multiple segments:

Out[2]=2

The visible region from an altitude of 10 km:

Out[1]=1

The boundary of the visible region from an altitude of 10 km:

Out[1]=1

Smooth country polygons using geo filled curves:

Show a map of smoothed South American nations:

Out[2]=2

Plot the area around the Arctic Circle:

Out[1]=1

Combine a number of geo graphics primitives in one map:

Out[1]=1

GeoGraphics supports 2D and 3D graphics primitives:

Out[1]=1

Projections and Map Coordinates  (8)

Large-scale maps use the equirectangular projection by default:

Out[1]=1
Out[2]=2

Intermediate-scale maps use the Lambert azimuthal projection centered at the geo range of the map:

Out[3]=3
Out[4]=4

Small scales are represented by default using the Mercator projection, to preserve angles:

Out[5]=5
Out[6]=6

Choose a projection with default parameters from GeoProjectionData[]:

Out[1]=1
Out[2]=2

Specify the parameters of a cylindrical projection using the default center meridian at Greenwich:

Out[1]=1

Choose any other meridian as the origin for projected longitudes:

Out[2]=2

Center the map at that longitude:

Out[3]=3

For cylindrical projections, easting represents longitude and is returned in degrees. Use radians instead:

Out[4]=4

Use a scale in kilometers for equatorial distance. The same radius geo disks show distance distortion:

Out[5]=5

Specify the parameters of an azimuthal projection, mainly the tangency point of the projection plane:

Out[1]=1
Out[2]=2

Some azimuthal projections cannot cover the whole world in a single map; the Lambert azimuthal projection can:

Out[3]=3

Specify the parameters of a conic projection by choosing a centering point:

Out[1]=1
Out[2]=2

Choose the standard parallels, which are true to scale, and draw them:

Out[3]=3
Out[4]=4

Geo primitives are defined in terms of {lat,lon} positions on the Earth and they are projected:

Out[1]=1

Standard primitives are defined in terms of map coordinates and they are not projected:

Out[2]=2

Standard primitives may be placed using GeoPosition[{lat,lon}], which is automatically projected:

Out[3]=3

A GeoPath (geodesic or loxodrome) is generically curved in the map:

Out[1]=1

The standard Line primitive is always a straight line in the map:

Out[2]=2

Coordinates coincide (though reversed) only for the equirectangular projection; use GeoPosition otherwise:

Out[3]=3

A filled GeoPath has generically curved sides in the map:

Out[2]=2

The standard Polygon primitive always has straight sides:

Out[3]=3

Compare both together:

Out[4]=4

Coordinates  (3)

Coordinate ranges for the map are determined by the total bounding box of all coordinates:

Out[1]=1

Coordinate specifications outside primitives contribute to the bounding box, but are not plotted:

Out[1]=1

Therefore this produces a map around a given geographical entity, with default geo range padding:

Out[2]=2

Coordinates in Graphics primitives that are not wrapped in GeoPosition are considered to be already in final projection. They also count toward the total coordinates range:

Out[1]=1

Options  (21)Common values & functionality for each option

GeoBackground  (4)

Use the default background for map region and background:

Out[1]=1

Draw a relief map background for a map of the US:

Out[2]=2

Use a relief map background for world maps with various projections:

Out[3]=3

Specify a uniform background for the geographic map:

Out[1]=1

Specify uniform backgrounds for the map and graphic as a whole:

Out[2]=2

World map with country boundaries:

Out[1]=1

European country borders in 1900:

Out[2]=2

Use vector geo backgrounds:

Out[1]=1
Out[2]=2

GeoCenter  (1)

Use GeoCenter to define the center for the map:

Out[1]=1

The geo range is extended to have Munich at the center of the map:

Out[2]=2

GeoGridLines  (1)

Use GeoGridLines to overlay the map with lines of latitude and longitude:

Out[1]=1

Show geo grid lines (constant latitude and longitude) and grid lines (constant projected coordinates):

Out[2]=2

GeoGridLinesStyle  (1)

Use GeoGridLinesStyle to change the styling for lines of latitude and longitude:

Out[1]=1

GeoGridRange  (2)

Specify projected coordinate ranges in the coordinate system determined by the projection:

Out[1]=1

A map of the Chicago area in zone 16 of the Universal Transverse Mercator coordinate system:

Out[1]=1
Out[2]=2

GeoGridRangePadding  (1)

Add padding in the projected coordinate system:

Out[1]=1

Add positive padding in the horizontal direction, but negative padding in the vertical direction:

Out[2]=2

GeoModel  (2)

Construct a geodesic path that leaves London with NE direction and goes around the Earth three times:

Out[1]=1

Computations are performed by default on an ellipsoidal Earth, meaning geodesic paths do not close:

Out[2]=2

Using a spherical model for the Earth results in closed geodesics:

Out[3]=3

A map of Mars:

Out[1]=1

GeoProjection  (1)

Use GeoProjection to choose the map projection:

Out[1]=1

GeoRange  (1)

Use GeoRange to define the latitude and longitude coordinate ranges:

Out[1]=1
Out[2]=2
Out[3]=3

GeoRangePadding  (1)

Use GeoRangePadding to pad the coordinate range for the map:

Out[1]=1

GeoResolution  (1)

Specify the geo zoom level as an average distance between neighboring pixels:

Out[1]=1
Out[2]=2

GeoScaleBar  (1)

Show a map with no geo scale:

Out[1]=1

Display the geo scale in kilometers:

Show a geo scale in metric and imperial:

GeoServer  (1)

By default, GeoGraphics downloads geo background tiles from the Wolfram geo server:

Out[1]=1

Use an alternative tile server:

Out[2]=2

GeoZoomLevel  (2)

Display Canada at the default GeoZoomLevel:

Out[1]=1
Out[2]=2

Explicitly specify GeoZoomLevel to obtain a more detailed map rendering:

Out[3]=3

Display the area around the Eiffel Tower at different levels of magnification:

Out[1]=1

MetaInformation  (1)

Meta-information about the map sources:

Out[1]=1
Out[2]=2

Add your own meta-information:

Out[3]=3
Out[4]=4

Applications  (9)Sample problems that can be solved with this function

Make a map of the 50 states in the US with Alaska and Hawaii as insets:

Out[1]=1
Out[2]=2
Out[3]=3

Use polygons, geo circle, and other graphics primitives to build up a geographic map:

Out[1]=1

Draw thick arrows between pairs of countries:

Out[2]=2

Show the configuration of continents on Earth 200 million years ago:

Out[1]=1

Retrieve the epicenter locations of earthquakes in California:

Plot the epicenters on a map of California:

Out[2]=2

Get the geographic bounds of California:

Make a smooth kernel distribution of the earthquake epicenters:

Plot the results:

Out[5]=5

Show the results on a map with the epicenters themselves shown as black dots:

Out[6]=6

Construct street maps of Monaco and Gibraltar:

Out[1]=1

Transplant Monaco (centered at the Trump Building) and Gibraltar (centered at the Brooklyn Central Library) to New York by modifying the coordinates of the polygon:

Show the shifted Monaco and Gibraltar on top of the city limits of New York:

Out[3]=3

Define "Australian" transformation and geo disk centered on Australia:

Plot Australia from the rest of the world's perspective:

Out[3]=3

Plot the rest of the world from Australia's perspective:

Out[4]=4

Compare a historical map of Paris with a modern street map:

Out[1]=1

Crop the elegant yet extraneous frame:

Out[2]=2

Pick three characteristic points on the two maps and identify them with approximate positions:

Plot the resulting points on the maps:

Out[4]=4

Get a street map of Paris from today:

Out[5]=5

Find an affine transformation that maps the three points from each map into each other:

Out[7]=7

Color the modern street map in gray and the historical map in red:

Out[8]=8

Use the preceding affine transformation to show the two aligned maps over each other:

Out[9]=9

Smooth out and scale a country by computing a discrete Fourier transform of its boundary:

Superimpose scaled geo B-spline versions of the US border on a map:

Out[3]=3

Properties & Relations  (7)Properties of the function, and connections to other functions

GeoGraphics returns a GeoGraphics expression, with a Graphics object in its first argument:

Out[1]=1
Out[2]=2

GeoImage returns an Image expression, the background image of the previous result:

Out[3]=3
Out[4]=4

GeoGraphics behaves like Graphics with standard primitives, but adds a geo background:

Out[1]=1

Coordinates are interpreted as {lon,lat} angles in the equirectangular projection:

Out[2]=2
Out[3]=3

Add GeoPosition wrappers to use {lat,lon} angles:

Out[4]=4

Coordinates inside geo primitives are always given in {lat,lon} angles:

Out[1]=1

Adding GeoPosition does not modify the result:

Out[2]=2

GeoRange determines the part of the Earth to plot, before projection:

Out[2]=2
Out[3]=3

PlotRange determines the part of the map to plot, after projection:

Out[4]=4

Use GeoRangePadding to extend the geo range:

Out[5]=5

Use PlotRangePadding to extend the plot range:

Out[6]=6

Use GeoRangePaddingFull to automatically extend the geo range to cover the initial plot range:

Out[7]=7

Geographic Entity objects represent the corresponding region or position, but are not geo primitives:

Out[1]=1

Use Polygon or Point to draw the respective region or point, with default geo styling:

Out[2]=2

Modify the default geo styling:

Out[3]=3

The shapes of entities generically undergo distortion upon projection. Here are default (in this case "Mercator") and "Equirectangular" projections for Sweden:

Out[2]=2
Out[3]=3

Using GeoGridPosition and an explicit projection, you can project the country by hand:

The coordinates of the manually transformed polygon match the ones from the default projection:

Out[5]=5

Using Line (or Arrow) inside a geo graphic gives a straight line whose points depend on the projection:

Out[1]=1

To get a shortest line (geodesic), use GeoPath. Its points are independent of the projection:

Out[2]=2

Possible Issues  (1)Common pitfalls and unexpected behavior

Because entity classes are taken as a collection of polygons, showing a map of Europe includes internal national boundaries:

Out[1]=1

To eliminate internal boundaries, draw the polygons twice, first with boundaries and then without them:

Out[2]=2

Interactive Examples  (1)Examples with interactive outputs

Extract location and times from a time series object representing a short stroll and then compute distance traveled and average speed:

Visualize the result:

Out[2]=2

Neat Examples  (7)Surprising or curious use cases

Drape the African nations in their national flags:

Place flag images on countries and use the country names as tooltips:

Out[2]=2

Use flag images annotated with country names as tooltips:

Out[3]=3

Show the age distribution in Germany:

Out[1]=1

Obtain the same data for all European countries as computable data:

Out[3]=3

Compute pie charts:

Show an age pie chart for Germany where tooltips indicate millions of people in each group:

Out[5]=5
Out[6]=6

Overlay a map of Europe with a pie chart showing age distribution for each country:

Out[7]=7

Find the graph of neighboring European countries:

Out[2]=2

Compute a four-coloring:

Out[4]=4

Show national flags of some countries and speak their names when clicked:

Out[1]=1

Transform country polygons into shapes with rounded borders using filled Bspline curves:

Display countries as "puzzle pieces":

Out[3]=3

Retrieve names, locations, and yields of all nuclear explosions detonated by the United States:

Plot the points on a map:

Out[2]=2

Paint a purple spiral on France:

Draw the graphic:

Out[3]=3
Wolfram Research (2014), GeoGraphics, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoGraphics.html (updated 2021).
Wolfram Research (2014), GeoGraphics, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoGraphics.html (updated 2021).

Text

Wolfram Research (2014), GeoGraphics, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoGraphics.html (updated 2021).

Wolfram Research (2014), GeoGraphics, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoGraphics.html (updated 2021).

CMS

Wolfram Language. 2014. "GeoGraphics." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/GeoGraphics.html.

Wolfram Language. 2014. "GeoGraphics." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/GeoGraphics.html.

APA

Wolfram Language. (2014). GeoGraphics. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoGraphics.html

Wolfram Language. (2014). GeoGraphics. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoGraphics.html

BibTeX

@misc{reference.wolfram_2025_geographics, author="Wolfram Research", title="{GeoGraphics}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/GeoGraphics.html}", note=[Accessed: 24-March-2025 ]}

@misc{reference.wolfram_2025_geographics, author="Wolfram Research", title="{GeoGraphics}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/GeoGraphics.html}", note=[Accessed: 24-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_geographics, organization={Wolfram Research}, title={GeoGraphics}, year={2021}, url={https://reference.wolfram.com/language/ref/GeoGraphics.html}, note=[Accessed: 24-March-2025 ]}

@online{reference.wolfram_2025_geographics, organization={Wolfram Research}, title={GeoGraphics}, year={2021}, url={https://reference.wolfram.com/language/ref/GeoGraphics.html}, note=[Accessed: 24-March-2025 ]}