Function Repository Resource:

GeoInsetMap (1.0.0) current version: 1.1.1 »

Source Notebook

Generate maps within maps of a specific location

Contributed by: Jeff Bryant

ResourceFunction["GeoInsetMap"][entity]

create an inset map of the specified entity using its diameter as the range.

ResourceFunction["GeoInsetMap"][{loc, range}]

create an inset map centered at loc covering the specified range.

Details and Options

An inset map is a map that shows a larger area in context to a smaller area
Entities can be used as a single first argument only if they have a "Position" and "Diameter" property
loc can be an entity with known position or an explicit GeoPosition
ResourceFunction["GeoInsetMap"] takes the same options as GeoGraphics with the following additions:
"GeoElements"{}additional geo elements to include
"InsetZoom"Falsewhether to zoom the inset
GeoRangePadding cannot be overridden since its used to create space for the inset map

Examples

Basic Examples (3) 

Create an inset map of Manicouagan crater:

In[1]:=
ResourceFunction["GeoInsetMap"][Entity["EarthImpact", "Manicouagan"]]
Out[1]=

Create an inset map of Mount Everest with a range of 20km:

In[2]:=
ResourceFunction["GeoInsetMap", ResourceVersion->"1.0.0"][{Entity["Mountain", "MountEverest"], Quantity[20, "Kilometers"]}]
Out[2]=

Create an inset map of the Richat Structure in Mauritania:

In[3]:=
ResourceFunction["GeoInsetMap", ResourceVersion->"1.0.0"][{GeoPosition[{21.124, -11.402}], Quantity[34, "Miles"]}]
Out[3]=

Options (2) 

Entities with known coordinates but without an available diameter property can still be used:

In[4]:=
ResourceFunction["GeoInsetMap", ResourceVersion->"1.0.0"][{Entity["Park", "CumberlandGapNationalHistoricalPark::dv28t"], Quantity[10, "Miles"]},
  GeoBackground -> GeoStyling["ReliefMap", ColorFunction -> "AlpineColors"]]
Out[4]=

The Chesapeake Bay Crater is buried, leaving very little evidence of its existence:

In[5]:=
crater = Entity["EarthImpact", "ChesapeakeBay"];

Use GeoElements to draw a red circle highlighting the diameter of the crater:

In[6]:=
ResourceFunction["GeoInsetMap"][crater, "InsetZoom" -> True, GeoBackground -> "StreetMap", "GeoElements" -> {Red, GeoCircle[crater, crater["Diameter"]/2]}, ImageSize -> 600]
Out[6]=

Neat Examples (3) 

Chicxulub Crater is famous for being the smoking gun for the asteroid impact that helped kill off the dinosaurs:

In[7]:=
loc = Entity["EarthImpact", "Chicxulub"];

The default relief map doesn't have enough vertical exaggeration to show any surface evidence of this buried crater and doesn't show sea level.

Define a custom color function that draws a clear boundary between sea level and land:

In[8]:=
seaColors = {RGBColor[0., 0.33, 0.467384], RGBColor[0.05, 0.51, 0.67]};
In[9]:=
landColors = {RGBColor[0.43, 0.5, 0], RGBColor[
   0.466483, 0.463526, 0.350901], RGBColor[
   0.468481, 0.417383, 0.288117], RGBColor[
   0.469845, 0.374163, 0.235271], RGBColor[
   0.483797, 0.359707, 0.217583], RGBColor[
   0.526719, 0.397452, 0.263694], RGBColor[
   0.633185, 0.525937, 0.420695], RGBColor[
   0.812397, 0.757547, 0.703722], RGBColor[1., 1., 1.]};
In[10]:=
chicxulubData = GeoElevationData[loc, GeoRange -> Quantity[400, "Miles"], GeoProjection -> Automatic, GeoZoomLevel -> 8];
In[11]:=
dataBounds = QuantityMagnitude@MinMax[Flatten[chicxulubData]];
In[12]:=
cfun = Function[elevation, Blend[Join[Partition[Riffle[{dataBounds[[1]], 0}, seaColors], 2], Transpose[{Table[
        i, {i, 0, dataBounds[[2]], (dataBounds[[2]] - 1)/8}], landColors}]], elevation]];

Adjust box ratios to provide more vertical exaggeration and the range extended:

In[13]:=
ResourceFunction["GeoInsetMap"][{loc, Quantity[150, "Miles"]}, "InsetZoom" -> True, GeoBackground -> GeoStyling["ReliefMap", ColorFunction -> cfun, ColorFunctionScaling -> False, BoxRatios -> {.1, .1, 1}]]
Out[13]=

Subtle curved relief features can now be made out in the lower-right quarter of the white box that show the boundary between crystalline rocks in the crater center and the younger and softer limestone outside of the curved features.

Requirements

Wolfram Language 14.0 (January 2024) or above

Version History

  • 1.1.1 – 31 March 2025
  • 1.1.0 – 21 March 2025
  • 1.0.0 – 18 March 2025

License Information