1# Include polygon fill patterns and scalebar definition.
2#
3include symbols.mapyrus
4include scalebar.mapyrus
5
6
7newpage "eps", "mapview2.eps", 70, 40, "background=white lineantialiasing=true"
8worlds 40000, 40000, 50000, 45000
9
10let scale=Mapyrus.worlds.scale
11
12# Import polygons of imaginary vegetation.
13#
14dataset "textfile", "vegetation.dat", "comment=#"
15while Mapyrus.fetch.more
16do
17	fetch
18	let nCoords = $1
19	let vegCode = $2
20
21	# Add all coordinate for this polygon to path.
22	#
23	fetch
24	clearpath
25	move $1, $2
26	let i = 1
27	while i < nCoords
28	do
29		fetch
30		draw $1, $2
31		let i = i + 1
32	done
33
34	# Display polygon differently, depending on its vegetation class.
35	#
36	if vegCode == 1
37	then
38		savannah
39	elif vegCode == 2
40	then
41		wheatfield
42	elif vegCode == 3
43	then
44		barerock
45	elif vegCode == 4
46	then
47		marsh
48	elif vegCode == 5
49	then
50		marsh
51	elif vegCode == 6
52	then
53		water
54	endif
55
56	# Show outline of polygon
57	#
58	color "black"
59	linestyle 0.1
60	stroke
61done
62
63newpage "eps", "mapview2legend.eps", 40, 50, "background=white lineantialiasing=true"
64clearpath
65let counter=0
66while counter < Mapyrus.key.count
67do
68	move 2, 1 + counter * 8
69	let counter=counter+1
70done
71
72font "Helvetica", 3
73color "black"
74legend 7
75
76# Create a scalebar for the map.
77#
78newpage "eps", "mapview2scalebar.eps", 50, 15, "background=white lineantialiasing=true"
79clearpath
80scalebar scale, "m", 0, 0
81
82# Draw north arrow for the map.
83#
84newpage "eps", "mapview2north.eps", 20, 20, "background=white"
85clearpath
86move 10, 10
87nsew
88