Function Repository Resource:

GeoInsetMap (1.1.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.
loc can be an entity with known position or an explicit GeoPosition.
If loc is an entity with no explicit diameter specified and it has a polygon property, callout lines are not drawn.
ResourceFunction["GeoInsetMap"] takes the same options as GeoGraphics with the following additions:
"BoundaryStyle"Whitestyle to use for the boundary
"CalloutLinesStyle"Directive[Dashed,GrayLevel[.75]]style to use for callout lines
"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.1.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.1.0"][{GeoPosition[{21.124, -11.402}], Quantity[34, "Miles"]}]
Out[3]=

Options (4) 

Change the style of the callout lines:

In[4]:=
ResourceFunction["GeoInsetMap"][Entity["Lake", "LakeMichigan::y3357"],
  "CalloutLinesStyle" -> Orange]
Out[4]=

Change the style of the boundary:

In[5]:=
ResourceFunction["GeoInsetMap"][
 Entity["AdministrativeDivision", {"Arizona", "UnitedStates"}], "BoundaryStyle" -> Directive[Dashed, Yellow]]
Out[5]=

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

In[6]:=
crater = Entity["EarthImpact", "ChesapeakeBay"];
In[7]:=
ResourceFunction["GeoInsetMap"][crater, "InsetZoom" -> True, GeoBackground -> "StreetMap", "GeoElements" -> {Red, GeoCircle[crater, crater["Diameter"]/2]}]
Out[7]=

Zoom into the inset map:

In[8]:=
ResourceFunction["GeoInsetMap"][
 Entity["AdministrativeDivision", {"Illinois", "UnitedStates"}], "InsetZoom" -> True]
Out[8]=

Neat Examples (2) 

Middlesboro crater is found just northwest of the Cumberland Gap:

In[9]:=
ResourceFunction["GeoInsetMap", ResourceVersion->"1.1.0"][{Entity["Park", "CumberlandGapNationalHistoricalPark::dv28t"], Quantity[10, "Miles"]},
  GeoBackground -> GeoStyling["ReliefMap", ColorFunction -> "AlpineColors", BoxRatios -> {1, 1, .03}], "GeoElements" -> {White, Text["Middlesboro crater", Entity["EarthImpact", "Middlesboro"]]}, "InsetZoom" -> True]
Out[9]=

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

In[10]:=
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[11]:=
seaColors = {RGBColor[0., 0.33, 0.467384], RGBColor[0.05, 0.51, 0.67]};
In[12]:=
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[13]:=
chicxulubData = GeoElevationData[loc, GeoRange -> Quantity[400, "Miles"], GeoProjection -> Automatic, GeoZoomLevel -> 8];
In[14]:=
dataBounds = QuantityMagnitude@MinMax[Flatten[chicxulubData]];
In[15]:=
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[16]:=
ResourceFunction["GeoInsetMap"][{loc, Quantity[150, "Miles"]}, "InsetZoom" -> True, GeoBackground -> GeoStyling["ReliefMap", ColorFunction -> cfun, ColorFunctionScaling -> False, BoxRatios -> {.1, .1, 1}]]
Out[16]=

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