GeoGraphics¶
Renders a geographic map. Woxi draws an equirectangular map using the embedded lowest-resolution (1:110m) Natural Earth country data, then overlays geographic primitives. The view auto-zooms to fit the data.
Supported primitives inside the content list:
GeoMarker[pos]— a map pin atposPoint[pos]— a filled dot atpos
together with color directives (Red, RGBColor[...], …) and PointSize.
A position is GeoPosition[{lat, lon}], a bare {lat, lon} pair (latitude
first), or a geographic Entity[…] (see below).
The result is a GeoGraphics object (its own head, as in the Wolfram Language)
that renders as an SVG image in the playground, Jupyter, or Woxi Studio.
$ wo 'Head[GeoGraphics[{Red, PointSize[Large], GeoMarker[GeoPosition[{-26.2041, 28.0473}]]}]]'
GeoGraphics
GeoMarker on its own stays symbolic until placed inside GeoGraphics:
Drawing primitives¶
Besides GeoMarker and Point, GeoGraphics draws connecting paths, filled
regions and geodesic circles. Each renders as part of the GeoGraphics image:
On their own (outside GeoGraphics) these primitives stay symbolic:
A named country is highlighted over the basemap:
Geographic entities¶
A position may be given as an Entity[…], resolved to coordinates through the
keshvar gazetteer. Entity["Country", name]
resolves to the country's center, and Entity["City", {city, region, country}]
to the center of its administrative subdivision (the gazetteer has no
city-level coordinates, so the region — e.g. a state or province — gives the
finest available placement):
$ wo 'Head[GeoGraphics[{Red, GeoMarker[Entity["City", {"Munich", "Bavaria", "Germany"}]]}, GeoRange -> Quantity[50, "Kilometers"]]]'
GeoGraphics
Options¶
ImageSize— map width in pixels (the height follows the data aspect ratio).GeoRange—"World"for the whole globe,All/Automaticto fit the data (the default), a lengthQuantity(e.g.Quantity[50, "Kilometers"]) for a disk of that radius around the data, or an explicit{{latmin, latmax}, {lonmin, lonmax}}window.GeoProjection—"Equirectangular"(the default) or"Mercator".GeoGridLines—Automaticdraws a latitude/longitude graticule;None(the default) omits it.
Geodesy functions¶
Distances, bearings and destinations use Karney's geodesic on the GRS80
ellipsoid (the Wolfram ITRF00 model). Values agree with the Wolfram Language
to about twelve significant figures.
$ wo 'Round[GeoBounds[{GeoPosition[{40, -100}], GeoPosition[{34, -118}]}]]'
{{34, 40}, {-118, -100}}
GeoNearest["Country", pos] returns the country containing a position:
Notes¶
Auto-zoom fits a single point to a square regional window and several points to their bounding box with padding. The basemap is fixed at 1:110m resolution, so very tight zooms show coarse coastlines.
GeoDistance, GeoDirection and GeoDestination differ from the Wolfram
Language in the last few displayed digits because Wolfram uses its own geodesic
implementation. GeoRegionValuePlot shades each country by its value and draws
a color-scale legend on the right; it returns a single Graphics object (the
Wolfram Language instead wraps a separate legend with Legended).