Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
    
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
3  
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
1  
@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
3  
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
add comment

3 Answers

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.

http://code.google.com/p/inkscape2tikz/source/browse/svg2tikz/?r=19562fdc36d4eef451219388ce3e9dc3c9c2a492

See also:

http://mirrors.linsrv.net/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf

share|improve this answer
add comment

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,
       path=Links/texmf-local-generic/pst-geo/data}
\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}

enter image description here

share|improve this answer
    
This was what I was looking for.... thank you! –  user4134 Apr 5 '11 at 20:39
add comment

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] (milieu) circle[radius=2pt];
  \fill[red] (trois quart bas) circle[radius=2pt];
\end{tikzpicture}
\end{document} 

enter image description here

enter image description here

share|improve this answer
7  
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
3  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.