GeoStyling

GeoStyling[mapstyle]

displays faces of polygons and other filled geo objects using mapstyle.

GeoStyling[mapstyle,directive]

uses mapstyle with the given graphics directive applied.

Details and Options

  • GeoStyling is a directive for GeoGraphics that applies textures and styling directives that are useful for maps.
  • GeoStyling applies to Polygon, GeoDisk, FilledCurve, Triangle, DayHemisphere, NightHemisphere, and GeoVisibleRegion.
  • Possible forms for mapstyle include:
  • Automaticuse default styling
    Noneuse no explicit styling
    "ContourMap"elevation data as contours
    "Coastlines"geo background style displaying coastlines
    "CountryBorders"geo background style displaying country borders
    Dated["CountryBorders",year]geo background style displaying historical country borders
    "OutlineMap"schematic region
    "ReliefMap"elevation data as color with shadows
    "Satellite"satellite imagery
    "SatelliteWithLabels"satellite imagery with labels
    "StreetMap"street map data
    "StreetMapLabelsOnly"street map labels only
    "StreetMapNoLabels"street map data omitting labels
    {"GeoImage",image}apply image as a texture to unprojected polygons and project
    {"Image",image}apply image as a texture to the projected polygons
  • GeoStyling[Automatic] is automatically applied by default to geo graphics and uses partial opacity with no explicitly specified color. It therefore inherits the default Graphics color behavior, meaning filled geo primitives are black in color but appear as transparent light gray when combined with their default partial transparency.
  • GeoStyling[None] removes any geo styling that has been set by previous GeoStyling specifications (including any set by GeoStyling[Automatic]). Using no geo styling results in the same default styles for geo graphics as for the usual Graphics (black with no transparency).
  • GeoStyling[] is equivalent to GeoStyling[None].
  • GeoStyling[directive] is equivalent to GeoStyling["OutlineMap",directive].
  • GeoStyling[mapstyle,directive] appends a graphics directive (or collection of individual directives inside an enclosing Directive) to the set of directives used to style a given mapstyle. All directives take effect for "OutlineMap", but only Opacity and EdgeForm take effect for other map styles.
  • The most recently applied GeoStyling specification in a geo graphics expression takes precedence. For geo primitives, GeoStyling specifications (including those from Automatic styling) take precedence over explicit graphics style directives added after the currently active GeoStyling. As a result of the default styling of GeoStyling[Automatic], bare color directives take effect by default, while GeoStyling must be explicitly wrapped around Opacity in order to change the transparency of filled geo primitives.
  • GeoStyling accepts most options applicable to Graphics. In addition, the following geo-specific options can be given:
  • GeoStylingImageFunction Noneimage processing function to apply
    GeoZoomLevel Automaticlevel of detail for styled geo graphics
  • GeoStyling["ContourMap",opts] accepts the same options as ListContourPlot.
  • GeoStyling["ReliefMap",opts] accepts the same options as ReliefPlot.

Examples

open allclose all

Basic Examples  (13)

Use default styling:

Specify the Automatic geo style explicitly:

Use default Graphics styles (no geo styling):

Show a schematic outline map:

Specify a named color and suppress geo background:

Use a relief map:

Use a relief map as a GeoBackground:

Use satellite imagery:

World map with coastlines:

World map with country borders:

Map of Europe with country borders in year 1900:

Specify different geo styles for different regions:

Specify different geo styles for different regions with partial overlaps:

Style the daylight portion of the Earth in partially transparent yellow:

Relief map of the Moon:

Scope  (25)

"Coastlines"  (1)

Mollweide map of the world, displaying the coastlines:

Select different graphical directives:

"ContourMap"  (2)

Specify a contour map of elevations over a country:

Adjust contours and add contour styling by passing ListContourPlot options:

Display elevation contours of Spain using the colors of its national flag:

"CountryBorders"  (2)

Mercator map of the world, displaying country borders:

Select different graphical directives:

Show country borders in year 1800 for the region corresponding to modern Italy:

"GeoImage"  (1)

The Stars and Stripes projected onto the US:

"Image"  (4)

The Stars and Stripes placed on the US:

Place images of some famous mathematicians within the present borders of their countries of origin:

Construct image/country pairs:

Draw the map:

Load an image of a flower from ExampleData:

Use as a texture map for the Netherlands:

Use a rasterized graphic:

"OutlineMap"  (5)

Use an outline map for Africa:

Use an outline map for Africa with a geo background style:

Specify a solid-fill color together with an edge color and style:

Specify a partially transparent fill color together with an edge color and style:

Directives in a geo style take precedence over bare directives for geo primitives:

Style the daylight portion of the Earth in partially transparent yellow on top of a relief map background:

This is equivalent to simply giving yellow as a color directive:

"ReliefMap"  (3)

Use a relief map for the US:

Use a relief map for the US with a contour map geo background style:

Show the region visible from the top of the Washington Monument using a relief map:

Relief map of the area around the Copernicus crater on the Moon:

"Satellite"  (2)

Use satellite imagery:

Satellite image of a geo disk on Mars:

"StreetMap"  (3)

Use a street map style for Virginia:

Street maps can have styled edges:

And opacity:

But not colors:

Show the region visible from the top of the Washington Monument using a street map:

Image processing effects can be applied using GeoStylingImageFunction:

"StreetMapLabelsOnly"  (1)

Use street map labels:

Use street map labels on top of a colored map region:

"StreetMapNoLabels"  (1)

Show Virginia with a boundary and a street map with no labels:

Show the region visible from the top of the Washington Monument using a street map with no labels:

Options  (13)

ColorFunction  (2)

Use the "ReliefMap" style with a named color scheme:

Change the default color function for a relief map of the Moon:

ColorFunctionScaling  (1)

No argument scaling for the "ReliefMap" style on the left; automatic scaling on the right:

ContourLabels  (1)

Contours  (1)

Specify the number of contours for the "ContourMap" style:

ContourShading  (1)

Leave the regions between contours blank for the "ContourMap" style:

Use default contour shading:

ContourStyle  (1)

Specify the ContourStyle for the "ContourMap" style:

Use default contour style:

GeoStylingImageFunction  (5)

Add salt-and-pepper noise to a map of Austria:

Sharpen a circular region near the Taj Mahal and blur the region outside it:

Add a tapered "swoosh" map effect around Paris:

Show the "swooshed" map:

Use the flag of a country as an image effect:

Place copies of the flag on the country and blur surrounding countries:

Apply various image effects to neighboring countries:

GeoZoomLevel  (1)

Set the GeoZoomLevel:

Show a street map of Paris around a famous structure at a number of zoom levels:

Properties & Relations  (6)

Color primitives apply directly to non-filled primitives but take effect together with the most recent geo styling (partial opacity by default) for filled geo primitives, resulting in a pink Michigan with a red arrow:

Specifying opacity has no effect here since it is trumped by the opacity set implicitly by GeoStyling[Automatic]:

Placing the opacity inside a geo styling causes it to take effect, overwriting the default GeoStyling[Automatic] setting:

For geo objects, the default geo style (partial opacity) is automatically applied together with the bare color directives that follow it:

Make Switzerland a solid color by removing the default geo style:

Make Switzerland a solid color using the "OutlineMap" geo style with directive Red:

Use a shorthand geo style specification equivalent to the above:

Move France and Switzerland after the geo styling specification turns both red (since the bare color directive in front of France is trumped by the geo styling color specification):

Make France blue and Switzerland red:

Do the same by turning off default styling so bare color directives can take effect:

Geo styles apply to (geo) polygons, triangles, filled curves, and geo disks, but not to ordinary 2D and 3D graphics primitives:

The coordinate values of the map correspond to latitude and longitude for the "Equirectangular" projection:

Map coordinates do not correspond to latitude and longitude for other projections:

Use GeoPosition to draw geo lines on any map projection:

Using "ReliefMap" as a map style gives a projected version of the requested region:

Using ReliefPlot of GeoElevationData directly gives an unprojected, differently styled version with no clipping:

Drape an image of a flower over the world:

This works because "World" is considered an entity:

Entity classes are taken as a collection of polygons, resulting in many flowers:

GeoGroup effectively joins the polygons:

Neat Examples  (1)

Display a Pokémon ocean surrounding their country of origin:

Show the map:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_geostyling, author="Wolfram Research", title="{GeoStyling}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/GeoStyling.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_geostyling, organization={Wolfram Research}, title={GeoStyling}, year={2017}, url={https://reference.wolfram.com/language/ref/GeoStyling.html}, note=[Accessed: 22-November-2024 ]}