[pstricks] [Fwd: Re: pst-map2d: questions]

Herbert Voss Herbert.Voss at fu-berlin.de
Wed Aug 26 21:20:08 CEST 2009


-------- Original-Nachricht --------
Betreff: Re: pst-map2d: questions
Datum: Fri, 21 Aug 2009 13:46:24 -0700 (PDT)
Von: Minsu <MinsuKim at gmx.net>
Organisation: http://groups.google.com
Newsgruppen: comp.text.tex
Referenzen:
[...]
now to my map:
Because there is seemingly only the choice for colored maps without
rivers or b/w-maps with rivers for Korea until now, the latter is
actually more interesting to me. So I use the pst-map2dII.sty, because
while adapting your "Stammtisch"-DE.tex-example I also learned a save
way to input hangul entries.
-- But though this works without complaining, the cities are somewhat
'displaced'. Do you know how to correct this? (The coordinates are
taken from wikipedia and the geohack-link respectively, e.g.
http://de.wikipedia.org/wiki/Seoul /
http://stable.toolserver.org/geohack/geohack.php?pagename=Seoul&language=de&params=37.565654_N_126.978135_E_region:KR-11_type:city%2810349291%29
) My map differs to yours as it is type=8, but I don't think that this
matters.
Here's the new file:

\documentclass{article}
\usepackage{pst-map2dII}
\usepackage{CJKutf8}
\pagestyle{empty}
\psset{path=dataII}
\makeatletter
\def\namhansi{\@ifnextchar*{\@startrue\namhansi at i}{\@starfalse
\namhansi at i*}}
\def\namhansi at i*{\@ifnextchar[{\namhansi at ii}{\namhansi at ii[black]}}
\def\namhansi at ii[#1]{\@ifnextchar<{\namhansi at iii[#1]}{\namhansi at iii[#1]
<0>}}%
\def\namhansi at iii[#1]<#2>(#3,#4,#5,#6){%
  \pst at killglue
  \def\pst at tempA{#6}
  \ifx\pst at tempA\empty\def\pst at tempB{#5}\else\def\pst at tempB{#6}\fi
  \pnodeMap(#4,#3){\pst at tempB} % Change coors
  \if at star\uput*[#2](\pst at tempB){\color{#1}\bfseries#5}
  \else\uput[#2](\pst at tempB){\color{#1}\bfseries#5}\fi
  \psdot(\pst at tempB)\ignorespaces}
\def\bukhansi{\@ifnextchar*{\@startrue\bukhansi at i}{\@starfalse
\bukhansi at i*}}
\def\bukhansi at i*{\@ifnextchar[{\namhansi at ii}{\namhansi at ii[black]}}
\def\bukhansi at ii[#1]{\@ifnextchar<{\bukhansi at iii[#1]}{\bukhansi at iii[#1]
<0>}}%
\def\bukhansi at iii[#1]<#2>(#3,#4,#5,#6){%
  \pst at killglue
  \def\pst at tempA{#6}
  \ifx\pst at tempA\empty\def\pst at tempB{#5}\else\def\pst at tempB{#6}\fi
  \pnodeMap(#4,#3){\pst at tempB} % Change coors
  \if at star\uput*[#2](\pst at tempB){\color{#1}\bfseries#5}
  \else\uput[#2](\pst at tempB){\color{#1}\bfseries#5}\fi
  \psdot(\pst at tempB)\ignorespaces}
\makeatother
\begin{document}
\begin{CJK}{UTF8}{mj}
\begin{center}
\psset{linewidth=1.25\pslinewidth}
\begin{pspicture*}(-3,-92)(9,-70)
\psset{unit=39}	% unit=39
\psset{type=8,latitude0=133,longitude0=125}
\WorldMapII[maillage,linewidth=0.75\pslinewidth,asia,%
          increment=50,limiteL=190,borders,rivers,city]
%\psparallel{38.00}
% out of function: mapcolor=green, etc.
%  \namhansi(N,E,hangul,ascii)
  \namhansi*[blue](37.55,126.983333,서울,Seoul)
52.5, 13.4
  \namhansi(35.1,129.033333,부산,Busan)
  \namhansi(35.866667,128.6,대구,Daegu)
  \namhansi(37.483333,126.633333,인천,Incheon)
  \namhansi<-30>(33.5,126.517,제주시,Jeju-si)
  \namhansi(35.166667,126.916667,광주,Gwangju)
  \namhansi(36.3501,127.3849,대전,Daejeon)
  \namhansi*(35.816667,127.15,전주,Jeonju)
  \namhansi(36.45,127.116667,공주,Gongju)
  \namhansi(37.866667,127.733333,춘천,Chuncheon)
  \namhansi(37.216667,127.783333,원주,Wonju)
  \namhansi(37.75,128.9,강능,Gangneung)
  \namhansi(35.55,129.316667,울산,Ulsan)
  \bukhansi(39.031859,125.753765,평양,Pyongyang)
  \bukhansi(37.966667,126.55,개성,Gaeseong)
  \bukhansi(39.916667,127.533333,함흥,Hamheung)
  \bukhansi(38.033333,125.716667,해주,Haeju)
  \bukhansi(42.433333,129.75,회령,Hoeryong)
  \bukhansi<10>(41.8,129.783333,총진,Chongjin)
%\mapput(127,37.57){Seoul} \rput(Seoul){서울}	% => double entry appears!
\end{pspicture*}
\end{center}
\end{CJK}
\end{document}


More information about the PSTricks mailing list