1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
|
# mercatormap package
# Matthew Bertucci 2/2/2022 for v1.02
#include:expl3
#include:graphicx
#include:pdftexcmds
#include:siunitx
#include:tikz
#include:xparse
### 3 Map Definition and Map Coordinates ###
\mermapset{options%keyvals}
#keyvals:\mermapset#c
vicinity=##L
python=%<python%>
definition prefix=%<prefix%>
fail on missing resource#true,false
every route={%<TikZ options%>}
samples=%<number%>
#endkeyvals
\mrcdefinemap{options%keyvals}
#keyvals:\mrcdefinemap#c
north=%<latitude%>
south=%<latitude%>
west=%<longitude%>
east=%<longitude%>
xmin=%<tile xmin%>
xmax=%<tile xmax%>
ymin=%<tile ymin%>
ymax=%<tile ymax%>
zoom=%<zoom%>
pixelwidth=%<pixels%>
pixelheight=%<pixels%>
westoffset=%<tile offset%>
northoffset=%<tile offset%>
southoffset=%<tile offset%>
basename=%<tile base name%>
attribution=%<text%>
attribution print=%<text%>
resource=#none,tiles,mergedmap,wmsmap
tile size=##L
#endkeyvals
\mrcmapeast
\mrcmapnorth
\mrcmapsouth
\mrcmapwest
\mrcmapattribution
\mrcmapattributionprint
\mrcpixelheight
\mrcpixelwidth
\mrcpgfpoint{latitude}{longitude}
\mrcNPdef{name}{latitude}{longitude}
\mrcNPfrompoint{name}{TiKZ point}
\mrcNPcs{name}
\mrcNPlat{name}
\mrcNPlon{name}
\ifmrcinmap{latitude}{longitude}{true}{false}
\ifmrcNPinmap{name}{true}{false}
\ifmrcinvicinity{latitude}{longitude}{true}{false}
\ifmrcNPinvicinity{name}{true}{false}
\mrcformlat{latitude}
\mrcformlat[options%keyvals]{latitude}
\mrcformlon{longitude}
\mrcformlon[options%keyvals]{longitude}
#keyvals:\mermapset#c,\mrcformlat#c,\mrcformlon#c
format angle=#decimal,decimal-0,decimal-1,decimal-2,decimal-3,decimal-4,degree,minute,second
format south=%<code%>
format north=%<code%>
format east=%<code%>
format west=%<code%>
format NEWS numeric
format NEWS absolute
#endkeyvals
### 4 Automated Map Definition and Map Tiles ###
\mrcactivatescript
\mrcsupplymap{definition}
\mrcsupplymap[options%keyvals]{definition}
\mermapsetsupply{options%keyvals}
#keyvals:\mrcsupplymap#c,\mermapsetsupply#c,\mrcmap#c,\mrcnewsupplysource#c
type=#reference,areafit,boundaries
zoom=%<zoom%>
north=%<latitude%>
south=%<latitude%>
west=%<longitude%>
east=%<longitude%>
area={%<name1,name2,...%>}
add area={%<name1,name2,...%>}
area from marker input=%<file name%>
add area from marker input=%<file name%>
area to reference
latitude=%<latitude%>
longitude=%<longitude%>
position=%<latitude%>:%<longitude%>
named position=%<name%>
width=%<width in tiles%>
tex width=##L
height=%<height in tiles%>
tex height=##L
align=#northwest,north,northeast,west,center,east,southwest,south,southeast
target=#none,tiles,mergedmap,wmsmap
url=%<URL%>
url with api key={%<prefix%>}{%<name%>}{%<postfix%>}
attribution=%<text%>
attribution print=%<text%>
basename=%<tile base name%>
flex reference scale=%<scale denominator%>
flex area scale=%<scale denominator%>
flex area fit
flex area fit=##L
pixel=%<pixel size%>
dpi=%<dpi value%>
source=#dummy,opentopomap,stamen terrain,stamen terrain-background,stamen terrain-labels,stamen terrain-lines,stamen toner,stamen toner-lite,stamen toner-hybrid,stamen toner-background,stamen toner-labels,stamen toner-lines,stamen watercolor,thunderforest opencyclemap,thunderforest transport,thunderforest landscape,thunderforest outdoors,thunderforest transport-dark,thunderforest spinal-map,thunderforest pioneer,thunderforest mobile-atlas,thunderforest neighbourhood,topplusopen web,topplusopen web grau,topplusopen p5,topplusopen p5 grau,topplusopen p10,topplusopen p10 grau,topplusopen p17.5,topplusopen p17.5 grau,topplusopen p25,topplusopen p25 grau,topplusopen p50,topplusopen p50 grau,topplusopen p100,topplusopen p100 grau,topplusopen p250,topplusopen p250 grau
#endkeyvals
\mrcsetapikey{name}{value}
\mrcumlaut{char}
\mrcapplymap{definition}
\mrcmap{definition}
\mrcmap[options%keyvals]{definition}
\mrcnewsupplysource{source}{options%keyvals}
### 5 Map Drawing ###
\mrcdrawmap
\mrcdrawmap[options%keyvals]
#keyvals:\mermapset#c,\mrcdrawmap#c
draw=#auto,path,tiles,mergedmap,wmsmap
map path={%<TikZ options%>}
map clip=%<code%>
map scope={%<TikZ options%>}
tile size=##L
flex tile size=##L
flex zoom=%<pseudo zoom%>
flex scale=%<scale denominator%>:%<latitude%>
named flex scale=%<scale denominator%>:%<name%>
#endkeyvals
\mrcclipmap
\mrcboundmap
\mrcdrawnetwork
\mrcdrawnetwork[options%keyvals]
#keyvals:\mermapset#c,\mrcdrawnetwork#c
network pieces=%<number%>
network distance=##L
network font=%<font commands%>
#endkeyvals
\mrcdrawinfo
### 6 Scales and Sizes ###
\mrctexwidth
\mrctexheight
\mrcscale
\mrctextokm{length}
\mrctextomile{length}
\mrckmtotex{number}
\mrcmiletotex{number}
\mrcmapscaledenominator
\mrcprettymapscale
\mrcprettymapwidth
\mrcprettymapheight
\mrcprettymapresolution
\mrcprettytilesize
\mrcdrawscalebar
\mrcdrawscalebar[options%keyvals]
#keyvals:\mrcdrawscalebar#c
width-in-km=%<number%>
width-in-kilometer=%<number%>
width-in-meter=%<number%>
width-in-mile=%<number%>
width-in-yard=%<number%>
partitions=%<number%>
height=##L
at={%<TikZ coordinate%>}
placement=%<TikZ placement%>
south-east-inside
south-east-inside=%<xshift%>;%<yshift%>
south-east-outside
south-east-outside=%<xshift%>;%<yshift%>
south-west-inside
south-west-inside=%<xshift%>;%<yshift%>
south-west-outside
south-west-outside=%<xshift%>;%<yshift%>
north-west-inside
north-west-inside=%<xshift%>;%<yshift%>
north-west-outside
north-west-outside=%<xshift%>;%<yshift%>
north-east-inside
north-east-inside=%<xshift%>;%<yshift%>
north-east-outside
north-east-outside=%<xshift%>;%<yshift%>
major style={%<TikZ options%>}
minor style={%<TikZ options%>}
double#true,false
single#true,false
transparent#true,false
solid#true,false
scale=%<scale denominator%>
#endkeyvals
### 7 Markers ###
\mrcmarker{options%keyvals}
\mermapsetmarker{options%keyvals}
#keyvals:\mrcmarker#c,\mermapsetmarker#c,\mrcnewmarkerstyle#c
first options={%<options%>}
last options={%<options%>}
latitude=%<latitude%>
lat=%<latitude%>
longitude=%<longitude%>
lon=%<longitude%>
position=%<latitude%>:%<longitude%>
named position=%<name%>
use inside=#map,vicinity
contents=%<text%>
pictocontents=%<code%>
alias=%<text%>
uuid=%<uuid%>
generic=%<text%>
category=%<category%>
show#true,false
hide#true,false
show category=%<category%>
show all but category=%<category%>
hide category=%<category%>
hide all but category=%<category%>
url=%<URL%>
link=%<name%>
use urls#true,false
ignore urls#true,false
use links#true,false
ignore links#true,false
type=#classic,pin,pinflip,drop,pictodrop,pictodropring,knob,pictoknob,pictoknobring,ringx,markx
font=%<font commands%>
text=#%color
draw=#%color
fill=#%color
angle=%<degrees%>
shift=##L
distance=##L
radius=##L
inner radius=##L
path style={%<TikZ options%>}
node style={%<TikZ options%>}
#endkeyvals
\mrcmarkerangle
\mrcmarkercategory
\mrcmarkercontents
\mrcmarkerdistance
\mrcmarkerfont
\mrcmarkergeneric
\mrcmarkerinnerradius
\mrcmarkerlatitude
\mrcmarkerlongitude
\mrcmarkerpictocontents
\mrcmarkerradius
\mrcmarkershift
\mrcmarkeruuid
\mrcnewmarkertype{type name}{TikZ code}
\mrcnewmarkerstyle{style name}{options%keyvals}
### 8 Routes ###
\begin{mrcroute}
\begin{mrcroute}[TikZ options]
\end{mrcroute}
\begin{mrcroute*}
\begin{mrcroute*}[TikZ options]
\end{mrcroute*}
\mrcrouteinput{file}#i
\mrcrouteinput[TikZ options]{file}#i
\mrcrouteinput*{file}#i
\mrcrouteinput*[TikZ options]{file}#i
\mrcpoint{latitude}{longitude}
### 9 Orthodromes and Loxodromes ###
\mrcdraworthodrome{lat1}{lon1}{lat2}{lon2}
\mrcdraworthodrome[TikZ options]{lat1}{lon1}{lat2}{lon2}
\mrcNPdraworthodrome{name1}{name2}
\mrcNPdraworthodrome[TikZ options]{name1}{name2}
\mrcprettyorthodistance{lat1}{lon1}{lat2}{lon2}
\mrcNPprettyorthodistance{name1}{name2}
\mrcstoreorthodistance{macro%cmd}{lat1}{lon1}{lat2}{lon2}#d
\mrcprettyloxodistance{lat1}{lon1}{lat2}{lon2}
\mrcNPprettyloxodistance{name1}{name2}
\mrcstoreloxodistance{macro%cmd}{lat1}{lon1}{lat2}{lon2}#d
# not documented
\mermaplastfivesum{arg}#*
\mrcpkgprefix#*
|