# Setting an image as the background of a GeoGraphics image

It's easy to set the background of a GeoGraphics image to black, e.g.,

GeoGraphics[Polygon[Entity["Country", "Canada"]],
GeoProjection -> {"Orthographic", "Centering" -> {0, -97}},
Background -> Black]


How do I replace the black background with an image? I've tried replacing Background -> Black with GeoBackground -> GeoStyling[{"Image", image}] but without success.

• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory Tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey May 22 '15 at 19:42
• The Prolog and Inset solution works nicely for my application. Thank you, @Mr.Wizard. – John Manuel May 22 '15 at 21:14

## 1 Answer

### Prolog

You can use Prolog and Inset which avoids rasterizing the GeoGraphics:

lena = ExampleData[{"TestImage", "Lena"}];

GeoGraphics[Polygon[Entity["Country", "Canada"]],
GeoProjection -> {"Orthographic", "Centering" -> {0, -97}},
Prolog -> Inset[Image[lena, ImageSize -> 500]]]


### RemoveBackground

RemoveBackground works on GeoGraphics; you can use Overlay or Show to combine:

geo = GeoGraphics[Polygon[Entity["Country", "Canada"]],
GeoProjection -> {"Orthographic", "Centering" -> {0, -97}}];

lena = ExampleData[{"TestImage", "Lena"}];

Overlay[{lena, RemoveBackground @ geo}]