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:
-
Automatic use default styling None use 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 None image processing function to apply GeoZoomLevel Automatic level 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 allBasic Examples (13)
Specify the Automatic geo style explicitly:
Use default Graphics styles (no geo styling):
Specify a named color and suppress geo background:
Use a relief map as a GeoBackground:
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:
Scope (25)
"Coastlines" (1)
"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)
"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:
Load an image of a flower from ExampleData:
"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)
"StreetMap" (3)
Use a street map style for Virginia:
Street maps can have styled edges:
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)
Options (13)
ColorFunction (2)
ColorFunctionScaling (1)
ContourLabels (1)
ContourShading (1)
ContourStyle (1)
Specify the ContourStyle for the "ContourMap" style:
GeoStylingImageFunction (5)
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:
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