diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-geo/pst-map2dII.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-geo/pst-map2dII.tex | 440 |
1 files changed, 218 insertions, 222 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-geo/pst-map2dII.tex b/Master/texmf-dist/doc/generic/pst-geo/pst-map2dII.tex index bf73ed554f7..35c449004e0 100644 --- a/Master/texmf-dist/doc/generic/pst-geo/pst-map2dII.tex +++ b/Master/texmf-dist/doc/generic/pst-geo/pst-map2dII.tex @@ -19,30 +19,31 @@ %% `pst-map2dII' is a PSTricks package to create geographical objects %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\fileversion{0.8} -\def\filedate{2004/05/09} - -\message{`PST-map2dII v\fileversion, \filedate\space (ML/GM/HV)} \csname PSTMapTwoDII\endcsname \let\PSTMapTwoDIILoaded\endinput % Require PSTricks -\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi -% David Carlisle interface to the `keyval' package. -\input pst-key.tex +\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex \fi +\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex \fi % +% +\def\fileversion{0.81} +\def\filedate{2005/11/10} +\message{`PST-map2dII v\fileversion, \filedate\space (ML/GM/HV)} \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax +\pst@addfams{pst-map2dII}% added 2005-09-29 hv + \SpecialCoor % -\define@key{psset}{path}{\edef\psk@WorldMap@Path{#1}} % chemin des données -\setkeys{psset}{path=data} +\define@key[psset]{pst-map2dII}{path}{\edef\psk@WorldMap@Path{#1}} % chemin des données +\psset{path=data} % -\define@key{psset}{type}{\edef\psk@WorldMapII@type{#1}} -\setkeys{psset}{type=1} -\define@key{psset}{increment}{\edef\psk@WorldMapII@increment{#1}} -\setkeys{psset}{increment=10} +\define@key[psset]{pst-map2dII}{type}{\edef\psk@WorldMapII@type{#1}} +\psset{type=1} +\define@key[psset]{pst-map2dII}{increment}{\edef\psk@WorldMapII@increment{#1}} +\psset{increment=10} % type=1 ==> Mercator % type=2 ==> Lambert % type=3 ==> simple @@ -51,142 +52,137 @@ % type=6 ==> Babinet % type=7 ==> Collignon % type=8 ==> Bonne -\define@key{psset}{n}{\edef\psk@WorldMap@n{#1}} -\setkeys{psset}{n=1.77245} % sqrt(pi) % pour Collignon +\define@key[psset]{pst-map2dII}{n}{\edef\psk@WorldMap@n{#1}} +\psset{n=1.77245} % sqrt(pi) % pour Collignon % -\define@key{psset}{limiteL}{\edef\psk@WorldMap@limiteL{#1}} -\setkeys{psset}{limiteL=180} % longitude limite +\define@key[psset]{pst-map2dII}{limiteL}{\edef\psk@WorldMap@limiteL{#1}} +\psset{limiteL=180} % longitude limite % -\define@key{psset}{limiteL}{\edef\psk@WorldMap@limiteL{#1}} -\setkeys{psset}{limiteL=180} % longitude limite +\define@key[psset]{pst-map2dII}{limiteL}{\edef\psk@WorldMap@limiteL{#1}} +\psset{limiteL=180} % longitude limite % -\define@key{psset}{latitude0}{\edef\psk@WorldMap@latitudeO{#1}} -\setkeys{psset}{latitude0=45} % pour Bonne latitude 0 +\define@key[psset]{pst-map2dII}{latitude0}{\edef\psk@WorldMap@latitudeO{#1}} +\psset{latitude0=45} % pour Bonne latitude 0 % -\define@key{psset}{longitude0}{\edef\psk@WorldMap@longitudeO{#1}} -\setkeys{psset}{longitude0=0} % pour Bonne longitude 0 +\define@key[psset]{pst-map2dII}{longitude0}{\edef\psk@WorldMap@longitudeO{#1}} +\psset{longitude0=0} % pour Bonne longitude 0 % \newif\ifPst@WorldMap@capitals -\define@key{psset}{capital}[false]{\@nameuse{Pst@WorldMap@capitals#1}} -\setkeys{psset}{capital=false} +\define@key[psset]{pst-map2dII}{capital}[false]{\@nameuse{Pst@WorldMap@capitals#1}} +\psset{capital=false} % \newif\ifPst@WorldMap@city -\define@key{psset}{city}[false]{\@nameuse{Pst@WorldMap@city#1}} -\setkeys{psset}{city=false} +\define@key[psset]{pst-map2dII}{city}[false]{\@nameuse{Pst@WorldMap@city#1}} +\psset{city=false} % \newif\ifPst@WorldMapII@Rivers -\define@key{psset}{rivers}[true]{\@nameuse{Pst@WorldMapII@Rivers#1}} -\setkeys{psset}{rivers=false} +\define@key[psset]{pst-map2dII}{rivers}[true]{\@nameuse{Pst@WorldMapII@Rivers#1}} +\psset{rivers=false} % \newif\ifPst@WorldMapII@Borders -\define@key{psset}{borders}[true]{\@nameuse{Pst@WorldMapII@Borders#1}} -\setkeys{psset}{borders=true} +\define@key[psset]{pst-map2dII}{borders}[true]{\@nameuse{Pst@WorldMapII@Borders#1}} +\psset{borders=true} % \newif\ifPst@WorldMapII@maillage -\define@key{psset}{maillage}[true]{\@nameuse{Pst@WorldMapII@maillage#1}} -\setkeys{psset}{maillage=true} -% -\newif\ifPst@WorldMapII@Fill -\define@key{psset}{Fill}[true]{\@nameuse{Pst@WorldMapII@Fill#1}} -\setkeys{psset}{Fill=true} +\define@key[psset]{pst-map2dII}{maillage}[true]{\@nameuse{Pst@WorldMapII@maillage#1}} +\psset{maillage=true} % \newif\ifPst@WorldMapII@Europe -\define@key{psset}{europe}[true]{\@nameuse{Pst@WorldMapII@Europe#1}} -\setkeys{psset}{europe=true} +\define@key[psset]{pst-map2dII}{europe}[true]{\@nameuse{Pst@WorldMapII@Europe#1}} +\psset{europe=true} % \newif\ifPst@WorldMapII@Asia -\define@key{psset}{asia}[true]{\@nameuse{Pst@WorldMapII@Asia#1}} -\setkeys{psset}{asia=false} +\define@key[psset]{pst-map2dII}{asia}[true]{\@nameuse{Pst@WorldMapII@Asia#1}} +\psset{asia=false} % \newif\ifPst@WorldMapII@Africa -\define@key{psset}{africa}[true]{\@nameuse{Pst@WorldMapII@Africa#1}} -\setkeys{psset}{africa=false} +\define@key[psset]{pst-map2dII}{africa}[true]{\@nameuse{Pst@WorldMapII@Africa#1}} +\psset{africa=false} % \newif\ifPst@WorldMapII@namer -\define@key{psset}{namer}[true]{\@nameuse{Pst@WorldMapII@namer#1}} -\setkeys{psset}{namer=false} +\define@key[psset]{pst-map2dII}{namer}[true]{\@nameuse{Pst@WorldMapII@namer#1}} +\psset{namer=false} % \newif\ifPst@WorldMapII@samer -\define@key{psset}{samer}[true]{\@nameuse{Pst@WorldMapII@samer#1}} -\setkeys{psset}{samer=false} +\define@key[psset]{pst-map2dII}{samer}[true]{\@nameuse{Pst@WorldMapII@samer#1}} +\psset{samer=false} % \newif\ifPst@WorldMapII@all% hv 2004-05-05 -\define@key{psset}{all}[true]{% - \setkeys{psset}{europe=true,asia=true,africa=true,namer=true,samer=true} +\define@key[psset]{pst-map2dII}{all}[true]{% + \psset{europe=true,asia=true,africa=true,namer=true,samer=true} } % -\define@key{psset}{level}{\edef\psk@WorldMapII@level{#1}}% hv 2004-05-05 -\setkeys{psset}{level=5}% only every 5th data record +\define@key[psset]{pst-map2dII}{level}{\edef\psk@WorldMapII@level{#1}}% hv 2004-05-05 +\psset{level=5}% only every 5th data record % \def\VariablesMap{% - /Coeff_mercatorY {2 div 45 add dup sin exch cos div ln 57.2958 mul} def % Mercator - /Coeff_simpleY {1 mul} def % simple - /Coeff_lambertY {sin 57.2958 mul} def % Lambert - /Coeff_sanson_flamsteedY {1 mul} def % Sanson_Flamstead - /Coeff_cylindricalY { dup sin exch cos div 57.2958 mul} def % Cylindrical - /Coeff_babinetY { sin 2 sqrt mul 57.2958 mul} def % Babinet + /Coeff_mercatorY { 2 div 45 add dup sin exch cos div ln 57.2958 mul } def % Mercator + /Coeff_simpleY {1 mul } def % simple + /Coeff_lambertY {sin 57.2958 mul } def % Lambert + /Coeff_sanson_flamsteedY {1 mul } def % Sanson_Flamstead + /Coeff_cylindricalY { dup sin exch cos div 57.2958 mul } def % Cylindrical + /Coeff_babinetY { sin 2 sqrt mul 57.2958 mul } def % Babinet /n \psk@WorldMap@n\space def - /Coeff_collignonY { 0 ge { 1 2 sqrt 90 Y sub 2 div sin mul sub 57.2958 mul n mul} - { 1 2 sqrt 90 Y add 2 div sin mul sub 57.2958 mul n mul neg} ifelse }def % Collignon - /Coeff_BonneY {pop /RHO l0 dup cos exch sin div Y neg l0 add 57.2958 div add def - /Theta Y cos X L0 sub mul RHO div def - Theta cos RHO mul neg 57.2958 mul}def % Bonne + /Coeff_collignonY { 0 ge { 1 2 sqrt 90 Y sub 2 div sin mul sub 57.2958 mul n mul } + { 1 2 sqrt 90 Y add 2 div sin mul sub 57.2958 mul n mul neg} ifelse } def % Collignon + /Coeff_BonneY { pop /RHO l0 dup cos exch sin div Y neg l0 add 57.2958 div add def + /Theta Y cos X L0 sub mul RHO div def + Theta cos RHO mul neg 57.2958 mul } def % Bonne /Coeff_mercatorX {1 mul} def % Mercator /Coeff_simpleX {1 mul} def % simple /Coeff_lambertX {1 mul} def % Lambert /Coeff_sanson_flamsteedX {Y cos mul} def % Sanson_Flamstead /Coeff_cylindricalX { 1 mul } def % Cylindrical /Coeff_babinetX { 2 mul 2 sqrt mul 3.1415926 div Y cos mul} def % Babinet - /Coeff_collignonX { 2 mul 2 sqrt mul 90 Y abs sub 2 div sin mul n div} def % Collignon + /Coeff_collignonX { 2 mul 2 sqrt mul 90 Y abs sub 2 div sin mul n div } def % Collignon /l0 \psk@WorldMap@latitudeO\space def /L0 \psk@WorldMap@longitudeO\space def /Coeff_BonneX {pop /RHO l0 dup cos exch sin div Y neg l0 add 57.2958 div add def /Theta Y cos X L0 sub mul RHO div def - Theta sin RHO mul 57.2958 mul}def % Bonne - \ifcase\psk@WorldMapII@type\or% type 1 % hv 2004-05-04 + Theta sin RHO mul 57.2958 mul } def % Bonne + \ifcase\psk@WorldMapII@type\or % type 1 % hv 2004-05-04 /CoeffY {Coeff_mercatorY} def /CoeffX {Coeff_mercatorX} def /StartY -85 def - \or% type 2 % hv 2004-05-04 + \or % type 2 % hv 2004-05-04 /CoeffY {Coeff_simpleY} def /CoeffX {Coeff_simpleX} def /StartY -90 def - \or% type 3 % hv 2004-05-04 + \or % type 3 % hv 2004-05-04 /CoeffY {Coeff_lambertY} def /CoeffX {Coeff_lambertX} def /StartY -90 def - \or% type 4 % hv 2004-05-04 + \or % type 4 % hv 2004-05-04 /CoeffY {Coeff_sanson_flamsteedY} def /CoeffX {Coeff_sanson_flamsteedX} def /StartY -90 def - \or% type 5 % hv 2004-05-04 + \or % type 5 % hv 2004-05-04 /CoeffY {Coeff_cylindricalY} def /CoeffX {Coeff_cylindricalX} def /StartY -85 def - \or% type 6 % hv 2004-05-04 + \or % type 6 % hv 2004-05-04 /CoeffY {Coeff_babinetY} def /CoeffX {Coeff_babinetX} def /StartY -90 def - \or% type 7 % hv 2004-05-04 + \or % type 7 % hv 2004-05-04 /CoeffY {Coeff_collignonY} def /CoeffX {Coeff_collignonX} def /StartY -90 def - \else% every other is type 8 % hv 2004-05-04 + \else % every other is type 8 % hv 2004-05-04 /CoeffY {Coeff_BonneY} def /CoeffX {Coeff_BonneX} def /StartY -90 def \fi /step \psk@WorldMapII@level\space def % hv 2004-05-04 + /increment \psk@WorldMapII@increment\space def } % \newcount\TypeProjection \def\WorldMapII{\pst@object{WorldMapII}} -\def\WorldMapII@i{\@ifnextchar[{\WorldMapII@do}{\WorldMapII@do[]}} -\def\WorldMapII@do[#1]{{% - \setkeys{psset}{#1}% +\def\WorldMapII@i{{% + \use@par% \begin@ClosedObj - \addto@pscode{% - /increment \psk@WorldMapII@increment\space def + \addto@pscode{ \VariablesMap 1 setlinejoin 0 0 translate @@ -291,157 +287,157 @@ europe-riv DrawRivers \fi - \ifPst@WorldMapII@Borders - (\psk@WorldMap@Path/europe-bdy.dat) run - europe-bdy - DrawBdy + \ifPst@WorldMapII@Borders + (\psk@WorldMap@Path/europe-bdy.dat) run + europe-bdy + DrawBdy + \fi \fi - \fi % -\ifPst@WorldMapII@Africa -(\psk@WorldMap@Path/africa-cil.dat) run - africa-cil - Draw -\ifPst@WorldMapII@Rivers -(\psk@WorldMap@Path/africa-riv.dat) run - africa-riv - DrawRivers - \fi -\ifPst@WorldMapII@Borders -(\psk@WorldMap@Path/africa-bdy.dat) run - africa-bdy - DrawBdy -\fi -\fi -% -\ifPst@WorldMapII@Asia -(\psk@WorldMap@Path/asia-cil.dat) run - asia-cil - DrawAsia -(\psk@WorldMap@Path/asia-isl.dat) run - asia-isl - Draw -\ifPst@WorldMapII@Rivers -(\psk@WorldMap@Path/asia-riv.dat) run - asia-riv - DrawRiversAsia - \fi -\ifPst@WorldMapII@Borders -(\psk@WorldMap@Path/asia-bdy.dat) run - asia-bdy - DrawBdy -\fi -\fi -\ifPst@WorldMapII@namer -(\psk@WorldMap@Path/namer-cil.dat) run - namer-cil - Draw -\ifPst@WorldMapII@Rivers -(\psk@WorldMap@Path/namer-riv.dat) run - namer-riv - DrawRivers - \fi -\ifPst@WorldMapII@Borders -(\psk@WorldMap@Path/namer-bdy.dat) run -(\psk@WorldMap@Path/namer-pby.dat) run - namer-bdy - DrawBdy - namer-pby - DrawBdy -\fi - \fi -\ifPst@WorldMapII@samer -(\psk@WorldMap@Path/samer-cil.dat) run - samer-cil - Draw - (\psk@WorldMap@Path/samer-arc.dat) run - samer-arc - DrawAsia -\ifPst@WorldMapII@Rivers -(samer-riv.dat) run - samer-riv - DrawRivers - \fi -\ifPst@WorldMapII@Borders -(\psk@WorldMap@Path/samer-bdy.dat) run - samer-bdy - DrawBdy -\fi -\fi -% -\ifPst@WorldMapII@maillage + \ifPst@WorldMapII@Africa + (\psk@WorldMap@Path/africa-cil.dat) run + africa-cil + Draw + \ifPst@WorldMapII@Rivers + (\psk@WorldMap@Path/africa-riv.dat) run + africa-riv + DrawRivers + \fi + \ifPst@WorldMapII@Borders + (\psk@WorldMap@Path/africa-bdy.dat) run + africa-bdy + DrawBdy + \fi + \fi +% + \ifPst@WorldMapII@Asia + (\psk@WorldMap@Path/asia-cil.dat) run + asia-cil + DrawAsia + (\psk@WorldMap@Path/asia-isl.dat) run + asia-isl + Draw + \ifPst@WorldMapII@Rivers + (\psk@WorldMap@Path/asia-riv.dat) run + asia-riv + DrawRiversAsia + \fi + \ifPst@WorldMapII@Borders + (\psk@WorldMap@Path/asia-bdy.dat) run + asia-bdy + DrawBdy + \fi + \fi + \ifPst@WorldMapII@namer + (\psk@WorldMap@Path/namer-cil.dat) run + namer-cil + Draw + \ifPst@WorldMapII@Rivers + (\psk@WorldMap@Path/namer-riv.dat) run + namer-riv + DrawRivers + \fi + \ifPst@WorldMapII@Borders + (\psk@WorldMap@Path/namer-bdy.dat) run + (\psk@WorldMap@Path/namer-pby.dat) run + namer-bdy + DrawBdy + namer-pby + DrawBdy + \fi + \fi + \ifPst@WorldMapII@samer + (\psk@WorldMap@Path/samer-cil.dat) run + samer-cil + Draw + (\psk@WorldMap@Path/samer-arc.dat) run + samer-arc + DrawAsia + \ifPst@WorldMapII@Rivers + (samer-riv.dat) run + samer-riv + DrawRivers + \fi + \ifPst@WorldMapII@Borders + (\psk@WorldMap@Path/samer-bdy.dat) run + samer-bdy + DrawBdy + \fi + \fi +% + \ifPst@WorldMapII@maillage % meridiens -limiteLongitude neg increment limiteLongitude {% for X - /X exch def - newpath - /Y StartY def - X CoeffX xunit StartY CoeffY yunit moveto -StartY increment 10 div StartY neg { % for Y - /Y exch def - X CoeffX xunit Y CoeffY yunit lineto -} for -gsave + limiteLongitude neg increment limiteLongitude {% for X + /X exch def + newpath + /Y StartY def + X CoeffX xunit StartY CoeffY yunit moveto + StartY increment 10 div StartY neg { % for Y + /Y exch def + X CoeffX xunit Y CoeffY yunit lineto + } for + gsave % 11 janvier 2004 -X 0 eq {1 0 0 setrgbcolor}{0.2 setgray} ifelse + X 0 eq { 1 0 0 setrgbcolor }{ 0.2 setgray } ifelse % -0.25 setlinewidth -stroke -grestore -} for + 0.25 setlinewidth + stroke + grestore + } for % parallèles -StartY increment StartY neg {% for Y - /Y exch def -newpath - /X limiteLongitude neg def - X CoeffX xunit Y CoeffY yunit moveto -limiteLongitude neg increment 10 div limiteLongitude { % for X - /X exch def - X CoeffX xunit Y CoeffY yunit lineto -} for + StartY increment StartY neg {% for Y + /Y exch def + newpath + /X limiteLongitude neg def + X CoeffX xunit Y CoeffY yunit moveto + limiteLongitude neg increment 10 div limiteLongitude { % for X + /X exch def + X CoeffX xunit Y CoeffY yunit lineto + } for % 11 janvier 2004 -Y 0 eq {1 0 0 setrgbcolor}{0.2 setgray} ifelse -% -0.25 setlinewidth -stroke -} for -\fi -/DrawCitys { -/CITY exch def -/Rayon exch def -/nbr CITY length def % nombre de villes -0 1 nbr 1 sub { - /compteur exch def - CITY compteur get aload pop - /X exch def /Y exch def - gsave - 1 0 0 setrgbcolor newpath - X CoeffX xunit Y CoeffY yunit - Rayon 0 360 arc closepath fill - grestore -} for -} def -\ifPst@WorldMap@city + Y 0 eq {1 0 0 setrgbcolor}{0.2 setgray} ifelse +% + 0.25 setlinewidth + stroke + } for + \fi + /DrawCitys { + /CITY exch def + /Rayon exch def + /nbr CITY length def % nombre de villes + 0 1 nbr 1 sub { + /compteur exch def + CITY compteur get aload pop + /X exch def /Y exch def + gsave + 1 0 0 setrgbcolor newpath + X CoeffX xunit Y CoeffY yunit + Rayon 0 360 arc closepath fill + grestore + } for + } def + \ifPst@WorldMap@city % les capitales - (\psk@WorldMap@Path/c-cap.dat) run - 1.5 % rayon du point - citycapitals - DrawCitys + (\psk@WorldMap@Path/c-cap.dat) run + 1.5 % rayon du point + citycapitals + DrawCitys % les autres villes - (\psk@WorldMap@Path/c-sub.dat) run - 0.5 % rayon du point - CitySub -DrawCitys -\fi -\ifPst@WorldMap@capitals + (\psk@WorldMap@Path/c-sub.dat) run + 0.5 % rayon du point + CitySub + DrawCitys + \fi + \ifPst@WorldMap@capitals % les capitales - (\psk@WorldMap@Path/c-cap.dat) run - 1.5 - citycapitals - DrawCitys -\fi -}% -\end@ClosedObj -}} + (\psk@WorldMap@Path/c-cap.dat) run + 1.5 + citycapitals + DrawCitys + \fi + }% + \end@ClosedObj + }\ignorespaces} % \def\pnodeMap(#1,#2)#3{% hv 2004-05-09 @@ -455,10 +451,10 @@ DrawCitys % %------------------- hv 2004-05-08 ---------------------- \def\psNodeLabelStyle{} -\define@key{psset}{mapCountry}{\edef\psk@WorldMap@mapCountry{#1}} -\setkeys{psset}{mapCountry=all} -\define@key{psset}{nodeWidth}{\edef\psk@WorldMap@nodeWidth{#1}} -\setkeys{psset}{nodeWidth=1mm} +\define@key[psset]{pst-map2dII}{mapCountry}{\edef\psk@WorldMap@mapCountry{#1}} +\psset{mapCountry=all} +\define@key[psset]{pst-map2dII}{nodeWidth}{\edef\psk@WorldMap@nodeWidth{#1}} +\psset{nodeWidth=1mm} \newpsstyle{psNodeMapStyle}{fillstyle=solid,fillcolor=red} % \def\mapput{\@ifnextchar[{\mapput@i}{\mapput@i[90]}} |