# Political map in LaTeX

Is there a package that can be used to make political maps in LaTeX? Like a world map or a map of Europe?

-
You want to draw a map? Or just include an image of one? If the latter, \includegraphics might be the appropriate thing to research –  Seamus Mar 11 '11 at 11:57
You can find on the web, free world maps in .pdf or .eps. After you can use TikZ or Pstricks to modify or add informations. –  Alain Matthes Mar 11 '11 at 12:18
@altermundus perhaps you could offer an answer to this question explaining how you might modify/overlay your own information to an existing pdf map? –  Seamus Mar 11 '11 at 12:27
Wikipedia is a good resource for SVG maps. The link is to a list of maps of Europe, for example. –  Seamus Mar 11 '11 at 12:29

The author of this code is Paul Gaborit (fctt)

\documentclass{article}
\usepackage{tikz}
\begin{document}
\newcommand\grilleimage[1]{
\foreach \x in {0,0.1,...,1.01}{
\path (#1.south west) -- (#1.north west) coordinate[pos=\x] (x);
\draw[gray]
(#1.south west |- x) ++(-.1,0)
node[left]{\pgfmathprintnumber{\x}} --  (#1.south east |- x);
\path (#1.south west) -- (#1.south east) coordinate[pos=\x] (x);
\draw[gray]
(#1.south west -| x) ++(0,-.1)
node[rotate=90,left]{\pgfmathprintnumber{\x}} --  (#1.north west -| x);
}
}
\newcommand\defpt[4]{
\path (#1.south west) -- (#1.south east) coordinate[pos=#2] (x);
\path (#1.south west) -- (#1.north west) coordinate[pos=#3] (y);
\coordinate (#4) at (x |- y);
}
\begin{tikzpicture}
\node[inner sep=0cm] (image) {\includegraphics[width=10cm]{eu}};
\grilleimage{image}
\defpt{image}{0.5}{0.5}{milieu}
\defpt{image}{0.75}{0}{trois quart bas}
\fill[red] (trois quart bas) circle[radius=2pt];
\end{tikzpicture}
\end{document}


-
It seems to me like this code just includes an map with \includegraphics[width=10cm]{eu} and then draws a grid around it with no apparent purpose. –  ipavlic Mar 11 '11 at 13:27
@ipavlic: The grid is used to add nodes on the map to modify the informations, then you can remove the map. First the user needs to find a map (.pdf or .eps) and then to modify the map, I see only one possiblity. –  Alain Matthes Mar 11 '11 at 13:50
@ipavlic: one more remark: the grid is automatically adapted to the width of the map (or the picture). –  Alain Matthes Mar 11 '11 at 13:58
I still don't see the use, sorry. It is just like having a physical graph paper for copying, only much more cumbersome. You still have to input all of your data by hand if you are planning to remove the map at some point. –  ipavlic Mar 11 '11 at 15:10

The pst-geo bundle can handle the CIS world data. It needs the latex->dvips->ps2df sequence, because the data is read on PostScript level.

\documentclass{article}
\usepackage{pst-map3d}
\definecolor{graygreen}{cmyk}{0.7,0,0.6,0.2}
\definecolor{BlueDark}{cmyk}{1,1,0,0.5}
\pagestyle{empty}

\begin{document}
\begin{pspicture*}(-0.5\linewidth,-0.45\textheight)(0.5\linewidth,0.5\textheight)
\psset{PHI=45,THETA=5,unit=7.5,
\WorldMapThreeD[lakes=false,circlesep=0.25,lakes=false,gridmap=false,
mapcolor=graygreen!50,bordercolor=red,rivers=false,
coasts=false,islandcolor=blue]%
\WorldMapThreeD[gridmapcolor=yellow,circles=false,lakes,gridmapdiv=5,france,
islandcolor=blue,blueEarth=false,
bordercolor=red,islands=false,borders=false,rivers,coasts,
coastcolor=blue]%
\psmeridien{2.32}   \psparallel{48.85}
\newpsstyle{NodeLabelStyle}{fillstyle=solid,fillcolor=yellow!50,framesep=0,
linestyle=none,opacity=0.5}
\input{villesFrance3d}
\newpsstyle{NodeLabelStyle}{fillstyle=solid,fillcolor=red!50,
framesep=0,linestyle=none,opacity=0.5}
\newpsstyle{psNodeMapStyle}{fillstyle=solid,fillcolor=yellow!50,linecolor=red}
\psset{nodeWidth=0.025\psunit,linecolor=red}
\pnodeMapIIID(10.51667,43.85){Lucques}
\pscircle[fillstyle=solid,fillcolor=green](Lucques){0.025\psunit}
\psdot[dotsize=0.025\psunit](Lucques)
\uput[u](Lucques){\psframebox[fillstyle=solid,fillcolor=yellow!50,framesep=0,
linestyle=none,opacity=0.5]{\textsf{Lucques}}}
\input{capitales3d}
\psepicenter[circlecolor=red,waves=16,Rmax=2000](0.3333,46.5833){Poitiers}
\end{pspicture*}

\end{document}


-
This was what I was looking for.... thank you! –  user4134 Apr 5 '11 at 20:39

Inkscape can convert a svg file (such a map, possibly modified) to LaTeX, by saving it with one particular option. (easy to find by scrolling the "save as" menu list) This approach uses postscript and requires pstricks to compile the file generated, preferably with the command line option: pdflatex -shell-escape.

There is also a python script svg2tikz, reportedly converting the svg file into TikZ code, but it appears to require more skills to use it.