Introduction
LaTeX can produce geographic documents ranging from simple annotated maps to complex spatial data visualizations. While dedicated GIS software handles professional cartography, LaTeX with TikZ and PGFPlots is excellent for academic papers, theses, and technical reports that need clean, reproducible geographic figures.
Including Map Images
The simplest approach: export a map from a GIS tool (QGIS, Google Maps, OpenStreetMap) and include it as an image:
\usepackage{graphicx}
\usepackage{caption}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.9\linewidth]{figures/regional-map.pdf}
\caption{Study area: San Francisco Bay Area}
\label{fig:study-area}
\end{figure}
For vector maps, export as PDF or SVG from your GIS tool โ they scale without pixelation.
Coordinate Annotations
Displaying Geographic Coordinates
\usepackage{siunitx}
% Decimal degrees
Location: \SI{40.7128}{\degree}N, \SI{74.0060}{\degree}W
% Degrees, minutes, seconds
Coordinates: 40ยฐ42'46"N, 74ยฐ0'22"W
% Using geopos package
\usepackage{geopos}
\geopos{40.7128}{-74.0060} % New York City
Annotating a Map Image with TikZ
\usepackage{tikz}
\usepackage{graphicx}
\begin{tikzpicture}
% Include the base map
\node[anchor=south west, inner sep=0] (map) at (0,0)
{\includegraphics[width=10cm]{map.png}};
% Get map dimensions
\begin{scope}[x={(map.south east)}, y={(map.north west)}]
% Add markers at relative positions (0-1 scale)
\fill[red] (0.45, 0.60) circle (3pt)
node[above right, font=\small] {City A};
\fill[blue] (0.70, 0.35) circle (3pt)
node[above right, font=\small] {City B};
% Draw a route
\draw[thick, orange, ->] (0.45, 0.60) -- (0.70, 0.35);
% Add a scale bar
\draw[thick] (0.05, 0.05) -- (0.15, 0.05);
\node[below, font=\tiny] at (0.10, 0.05) {100 km};
\end{scope}
\end{tikzpicture}
Drawing Simple Maps with TikZ
For schematic maps and diagrams, TikZ provides full control:
\usetikzlibrary{shapes.geometric, arrows.meta, positioning, decorations.pathmorphing}
\begin{tikzpicture}[scale=1.2]
% === Coastline (irregular path) ===
\draw[blue!60, line width=1.5pt, decorate,
decoration={random steps, segment length=3mm, amplitude=1mm}]
(0,3) -- (2,3.2) -- (4,2.8) -- (6,3.1) -- (8,3);
% === Land area ===
\fill[green!20] (0,0) rectangle (8,3);
% === Ocean ===
\fill[blue!15] (0,3) rectangle (8,5);
% === Cities ===
\foreach \name/\x/\y in {
Capital/4/1.5,
Port City/1/2.5,
Inland Town/6/1
} {
\fill[red] (\x,\y) circle (3pt);
\node[above, font=\small\bfseries] at (\x,\y) {\name};
}
% === Roads ===
\draw[gray, thick, dashed] (1,2.5) -- (4,1.5) -- (6,1);
% === River ===
\draw[blue, line width=1pt, decorate,
decoration={snake, amplitude=1mm, segment length=5mm}]
(3,0) -- (3.5,1.5) -- (4,1.5);
% === Labels ===
\node[font=\large\bfseries, blue!70] at (4,4) {Ocean};
\node[font=\large\bfseries, green!50!black] at (4,0.5) {Country Name};
% === Compass rose ===
\draw[->, thick] (7.5,0.3) -- (7.5,0.8) node[above, font=\tiny] {N};
\draw[->, thick] (7.5,0.3) -- (8.0,0.3) node[right, font=\tiny] {E};
% === Scale bar ===
\draw[thick] (0.2,0.2) -- (1.2,0.2);
\node[below, font=\tiny] at (0.7,0.2) {50 km};
\end{tikzpicture}
Data Visualization on Maps
Choropleth-style Data with PGFPlots
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
% Bar chart of regional data
\begin{tikzpicture}
\begin{axis}[
title={Population by Region},
xlabel={Region},
ylabel={Population (millions)},
symbolic x coords={North, South, East, West, Central},
xtick=data,
ybar,
bar width=0.5cm,
nodes near coords,
ymin=0,
width=10cm,
height=7cm,
]
\addplot coordinates {
(North, 4.2)
(South, 7.8)
(East, 5.1)
(West, 9.3)
(Central, 3.6)
};
\end{axis}
\end{tikzpicture}
Scatter Plot with Geographic Data
\begin{tikzpicture}
\begin{axis}[
title={Cities: Population vs Elevation},
xlabel={Elevation (m)},
ylabel={Population (thousands)},
grid=major,
width=10cm,
height=8cm,
]
\addplot[only marks, mark=*, mark size=3pt, blue]
coordinates {
(10, 8500) % coastal city
(450, 2300) % mid-elevation
(1200, 800) % mountain city
(2800, 150) % high altitude
(50, 12000) % large coastal
};
% Label specific points
\node[above right] at (axis cs:50,12000) {Capital};
\node[above right] at (axis cs:10,8500) {Port City};
\end{axis}
\end{tikzpicture}
Working with the tikz-osm Package
For OpenStreetMap integration:
% Note: requires internet connection during compilation
\usepackage{tikz}
\usepackage{tikz-osm} % if available in your TeX distribution
% Or use the standalone approach:
% 1. Export map tile from OpenStreetMap
% 2. Include as image
% 3. Overlay TikZ annotations
Geographic Tables
\usepackage{booktabs}
\usepackage{siunitx}
\begin{table}[htbp]
\centering
\caption{Major Cities: Coordinates and Population}
\begin{tabular}{lSSS}
\toprule
City & {Latitude (ยฐN)} & {Longitude (ยฐE)} & {Population (M)} \\
\midrule
Tokyo & 35.68 & 139.69 & 13.96 \\
New York & 40.71 & -74.01 & 8.34 \\
London & 51.51 & -0.13 & 8.98 \\
Sydney & -33.87 & 151.21 & 5.31 \\
Sรฃo Paulo & -23.55 & -46.63 & 12.33 \\
\bottomrule
\end{tabular}
\end{table}
Useful Packages for Geographic Documents
| Package | Purpose |
|---|---|
tikz |
General drawing, map annotations |
pgfplots |
Data plots and charts |
siunitx |
Coordinate formatting with units |
graphicx |
Including map images |
booktabs |
Professional tables |
geometry |
Page layout for large maps |
rotating |
Rotate figures/tables |
subcaption |
Side-by-side maps |
Tips for Geographic Figures
% Use landscape orientation for wide maps
\usepackage{pdflscape}
\begin{landscape}
\begin{figure}
\includegraphics[width=\linewidth]{wide-map.pdf}
\caption{Regional overview}
\end{figure}
\end{landscape}
% Consistent coordinate formatting
\newcommand{\coord}[2]{%
\SI{#1}{\degree}N, \SI{#2}{\degree}E%
}
Location: \coord{40.71}{-74.01}
% Cross-reference maps in text
As shown in Figure~\ref{fig:study-area}, the study area
encompasses three distinct climate zones.
Resources
- TikZ & PGF Manual
- PGFPlots Manual
- QGIS โ free GIS software for creating base maps
- Natural Earth โ free vector map data
- OpenStreetMap โ free map tiles
- TikZ Examples Gallery
Comments