GeoGraphics

GeoGraphics[primitives,options]

represents a two-dimensional geographical image.

Details and Options

Examples

open allclose all

Basic Examples  (7)

Show a map at the default location:

Display a street map centered on your current location:

Draw a polygon showing Italy:

Style a geo polygon with graphics directives:

Display a map of France and areas around it:

Draw a map of Germany only:

Plot the world in a Robinson projection:

Connect two points on Earth with GeoPath:

A map of the area around Olympus Mons on Mars:

Scope  (30)

Primitives  (19)

Plot the US as a geo polygon:

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

Draw a straight line between two cities:

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

Draw points at the positions of buildings of the Acropolis:

Show the location of London with a geo marker:

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

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

Color the part of the Earth currently in daylight:

Color the part of the Earth currently in darkness:

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

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

Plot a random path of 100 geodesic steps:

Draw an arrow between two cities:

Draw an arrow with multiple segments:

The visible region from an altitude of 10 km:

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

Smooth country polygons using geo filled curves:

Show a map of smoothed South American nations:

Plot the area around the Arctic Circle:

Combine a number of geo graphics primitives in one map:

GeoGraphics supports 2D and 3D graphics primitives:

Projections and Map Coordinates  (8)

Large-scale maps use the equirectangular projection by default:

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

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

Choose a projection with default parameters from GeoProjectionData[]:

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

Choose any other meridian as the origin for projected longitudes:

Center the map at that longitude:

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

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

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

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

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

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

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

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

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

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

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

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

A filled GeoPath has generically curved sides in the map:

The standard Polygon primitive always has straight sides:

Compare both together:

Coordinates  (3)

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

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

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

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:

Options  (20)

GeoBackground  (3)

Use the default background for map region and background:

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

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

Specify a uniform background for the geographic map:

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

World map with country boundaries:

European country borders in 1900:

GeoCenter  (1)

Use GeoCenter to define the center for the map:

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

GeoGridLines  (1)

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

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

GeoGridLinesStyle  (1)

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

GeoGridRange  (2)

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

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

GeoGridRangePadding  (1)

Add padding in the projected coordinate system:

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

GeoModel  (2)

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

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

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

A map of Mars:

GeoProjection  (1)

Use GeoProjection to choose the map projection:

GeoRange  (1)

Use GeoRange to define the latitude and longitude coordinate ranges:

Use PlotRange to define coordinate ranges after projection:

GeoRangePadding  (1)

Use GeoRangePadding to pad the coordinate range for the map:

GeoResolution  (1)

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

GeoScaleBar  (1)

Show a map with no geo scale:

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:

Use an alternative tile server:

GeoZoomLevel  (2)

Display Canada at the default GeoZoomLevel:

Explicitly specify GeoZoomLevel to obtain a more detailed map rendering:

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

MetaInformation  (1)

Meta-information about the map sources:

Add your own meta-information:

Applications  (9)

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

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

Draw thick arrows between pairs of countries:

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

Retrieve the epicenter locations of earthquakes in California:

Plot the epicenters on a map of California:

Get the geographic bounds of California:

Make a smooth kernel distribution of the earthquake epicenters:

Plot the results:

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

Construct street maps of Monaco and Gibraltar:

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:

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

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

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

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

Crop the elegant yet extraneous frame:

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

Plot the resulting points on the maps:

Get a street map of Paris from today:

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

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

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

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:

Properties & Relations  (7)

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

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

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

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

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

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

Adding GeoPosition does not modify the result:

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

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

Use GeoRangePadding to extend the geo range:

Use PlotRangePadding to extend the plot range:

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

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

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

Modify the default geo styling:

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

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:

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

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

Possible Issues  (1)

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

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

Interactive Examples  (1)

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

Visualize the result:

Neat Examples  (7)

Drape the African nations in their national flags:

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

Use flag images annotated with country names as tooltips:

Show the age distribution in Germany:

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

Compute pie charts:

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

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

Find neighboring European countries:

Encode four colors as Boolean variables and :

Express the condition that all pairs of bordering countries have different colors as a logical expression:

Compute a solution to the four-color problem:

Form the coloring:

Color each country according to the coloring found:

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

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

Display countries as "puzzle pieces":

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

Plot the points on a map:

Paint a purple spiral on France:

Draw the graphic:

Introduced in 2014
 (10.0)
 |
Updated in 2016
 (11.0)
2019
 (12.0)