-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample1-6-map.html
More file actions
375 lines (293 loc) · 21.3 KB
/
example1-6-map.html
File metadata and controls
375 lines (293 loc) · 21.3 KB
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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<!DOCTYPE html>
<html lang="el" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Example1-6.map — MapServer 8.6.2 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx.css?v=48f05237" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_collapse.css?v=226d88b4" />
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=dd298242" />
<link rel="stylesheet" type="text/css" href="../_static/ribbon.css?v=ea091bf4" />
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=84745c96"></script>
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../_static/copybutton.js?v=f281be69"></script>
<script src="../_static/translations.js?v=e109e2be"></script>
<link rel="icon" href="../_static/mapserver.ico"/>
<link rel="author" title="Σχετικά με αυτά τα κείμενα" href="../about.html" />
<link rel="index" title="Ευρετήριο" href="../genindex.html" />
<link rel="search" title="Αναζήτηση" href="../search.html" />
<link rel="copyright" title="Copyright" href="../copyright.html" />
</head><body>
<!-- for main branch only, do not backport this -->
<table width="100%" style="width: 100%; background-color: white;">
<tr>
<td rowspan="2" style="padding: 10px 0px 10px 10px;">
<a href="../index.html" title="Home"><img src="../_static/banner.png" alt="MapServer banner" border="0" /></a>
</td>
<td style="padding: 10px 10px 0px 0px; text-align: right; vertical-align: top;">
<a href="../index.html" title="Home">Home</a> |
<a href="../products.html" title="Products (MapServer core, MapCache, TinyOWS">Products</a> |
<a href="https://github.com/mapserver/mapserver/issues/" title="Issue Tracker (MapServer core)">Issue Tracker</a> |
<a href="../community/service_providers.html" title="Professional Service Providers">Service Providers</a> |
<a href="../faq.html" title="Frequently Asked Questions">FAQ</a> |
<a href="https://fosstodon.org/@mapserver" title="Mastodon" target="_blank">Mastodon</a> |
<a href="../download.html" title="Download Source or Binaries">Download </a> |
<a class="badge" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KRJ2X44N3HA6U&source=url" target="_blank">
<img src="https://img.shields.io/badge/donate-%E2%9D%A4%C2%A0-ff69b4.svg?style=flat" alt="Donate to MapServer">
</a>
</td>
</tr>
<tr>
<td style="padding: 0px 10px 0px 0px; text-align: right; vertical-align: bottom;">
<a href="../../tutorial/example1-6-map.html"><img src="../_static/flagicons/en.png" alt="en" title="en" border="0" /></a>
<a href="../../ar/tutorial/example1-6-map.html"><img src="../_static/flagicons/ar.png" alt="ar" title="ar" border="0" /></a>
<a href="../../de/tutorial/example1-6-map.html"><img src="../_static/flagicons/de.png" alt="de" title="de" border="0" /></a>
<img src="../_static/flagicons/el.png" alt="el" title="el" border="0" width="18px" height="13px"/>
<a href="../../es/tutorial/example1-6-map.html"><img src="../_static/flagicons/es.png" alt="es" title="es" border="0" /></a>
<a href="../../fr/tutorial/example1-6-map.html"><img src="../_static/flagicons/fr.png" alt="fr" title="fr" border="0" /></a>
<a href="../../id/tutorial/example1-6-map.html"><img src="../_static/flagicons/id.png" alt="id" title="id" border="0" /></a>
<a href="../../it/tutorial/example1-6-map.html"><img src="../_static/flagicons/it.png" alt="it" title="it" border="0" /></a>
<a href="../../ja/tutorial/example1-6-map.html"><img src="../_static/flagicons/ja.png" alt="ja" title="ja" border="0" /></a>
<a href="../../nl_NL/tutorial/example1-6-map.html"><img src="../_static/flagicons/nl_NL.png" alt="nl_NL" title="nl_NL" border="0" /></a>
<a href="../../pl/tutorial/example1-6-map.html"><img src="../_static/flagicons/pl.png" alt="pl" title="pl" border="0" /></a>
<a href="../../ru/tutorial/example1-6-map.html"><img src="../_static/flagicons/ru.png" alt="ru" title="ru" border="0" /></a>
<a href="../../sq/tutorial/example1-6-map.html"><img src="../_static/flagicons/sq.png" alt="sq" title="sq" border="0" /></a>
<a href="../../tr/tutorial/example1-6-map.html"><img src="../_static/flagicons/tr.png" alt="tr" title="tr" border="0" /></a>
</td>
</tr>
</table>
<div class="related" role="navigation" aria-label="Related">
<h3>Πλοήγηση</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="Κεντρικό Ευρετήριοο"
accesskey="I">ευρετήριο</a></li>
<li class="nav-item nav-item-0"><a href="../index.html">Home</a> »</li>
<li class="nav-item nav-item-this"><a href="">Example1-6.map</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="example1-6-map">
<span id="id1"></span><h1>Example1-6.map<a class="headerlink" href="#example1-6-map" title="Link to this heading">¶</a></h1>
<div class="highlight-mapfile notranslate"><div class="highlight"><pre><span></span><span class="c1"># The annotated map file (sort of)</span>
<span class="c1"># Created by Pericles S. Nacionales for the MapServer tutorial</span>
<span class="c1"># 2005-04-08</span>
<span class="c1"># Maintained & enhanced since by Jeff McKenna, GatewayGeo</span>
<span class="c1"># 2023-04-19 Last updated</span>
<span class="c1">#</span>
<span class="c1"># MapServer map file uses the pound sign (#) to denote the start of a line</span>
<span class="c1"># comment--each line that needs to be commented has to be prepended with a "#".</span>
<span class="c1">#</span>
<span class="c1"># Map files begin with MAP keyword to signify the start of the map object.</span>
<span class="c1"># Well, the entire map file is THE map object. Enclosed between MAP and END</span>
<span class="c1"># at the very bottom of this map file, are keyword/value pairs and other</span>
<span class="c1"># objects.</span>
<span class="k">MAP</span>
<span class="k">IMAGETYPE</span> <span class="err">PNG</span><span class="mi">24</span>
<span class="c1"># EXTENT 199949.651166 -371954.772084 1472121.6862 632767.19157</span>
<span class="k">EXTENT</span> <span class="mf">201621.496941</span> <span class="p">-</span><span class="mf">294488.285333</span> <span class="mf">1425518.020722</span> <span class="mf">498254.511514</span> <span class="c1"># LAEA</span>
<span class="c1">#EXTENT -97.5 41.619778 -82.122902 49.38562 # Geographic</span>
<span class="k">SIZE</span> <span class="mi">400</span> <span class="mi">300</span>
<span class="k">SHAPEPATH</span> <span class="s">"../data"</span>
<span class="k">SYMBOLSET</span> <span class="s">"../symbols/symbols.txt"</span>
<span class="k">FONTSET</span> <span class="s">"../fonts/fonts.txt"</span>
<span class="c1"># The projection object is typically used within the map and the layer</span>
<span class="c1"># objects. You only define it once within the map object and this definition</span>
<span class="c1"># becomes your output projection--MapServer will render your maps in this</span>
<span class="c1"># projection. You also use the projection object within the layer object to</span>
<span class="c1"># define your input projection. Your layers can be in different</span>
<span class="c1"># projections--MapServer will reproject them into your output projection.</span>
<span class="c1"># If no projection is defined within the layer object, MapServer assumes</span>
<span class="c1"># your input projection is the same as your output projection. This is not</span>
<span class="c1"># a required object unless you're creating a map file that supports one of</span>
<span class="c1"># the OGC interoperability web services specifications (WMS/WFS/WCS).</span>
<span class="c1">#</span>
<span class="c1"># This is the output PROJECTION definition ------</span>
<span class="k">PROJECTION</span>
<span class="c1"># Projection parameters can be defined in two ways...</span>
<span class="c1"># This is the traditional PROJ definition of Lambert Azimuthal Equal-Area</span>
<span class="c1"># projection for the Continental U.S.</span>
<span class="s">"proj=laea"</span>
<span class="s">"ellps=clrk66"</span>
<span class="s">"lat_0=45"</span>
<span class="s">"lon_0=-100"</span>
<span class="c1"># Alternatively, you can specify an EPSG code.</span>
<span class="c1"># This is the EPSG code for Lambert Azimuthal Equal-Area</span>
<span class="c1"># projection for the U.S.</span>
<span class="c1">#</span>
<span class="c1"># "init=epsg:2163"</span>
<span class="k">END</span> <span class="c1"># End of the output Projection definition ---</span>
<span class="c1"># Layer objects are defined beneath the map object. You need at least one</span>
<span class="c1"># layer defined in your map file before you can display a map... You can</span>
<span class="c1"># define as many layers as you'd like.</span>
<span class="c1">#</span>
<span class="c1"># Start of LAYER DEFINITIONS ---------------------------------------------</span>
<span class="k">LAYER</span> <span class="c1"># States polygon layer begins here</span>
<span class="k">NAME</span> <span class="s">"states"</span>
<span class="k">DATA</span> <span class="s">"states_ugl.shp"</span>
<span class="k">STATUS</span> <span class="nb">OFF</span>
<span class="k">TYPE</span> <span class="nb">POLYGON</span>
<span class="c1"># Here's an example of the input projection definition.</span>
<span class="c1"># EPSG:4326 is code for geographic (latlong) projection</span>
<span class="c1"># using the WGS84 datum.</span>
<span class="c1">#</span>
<span class="c1"># PROJECTION objects within the LAYER object define the input</span>
<span class="c1"># projection--this is the native projection of your data.</span>
<span class="k">PROJECTION</span>
<span class="s">"init=epsg:4326"</span>
<span class="k">END</span>
<span class="c1"># CLASSITEM defines the non-spatial attribute that you will be using to</span>
<span class="c1"># separate a layer into classes. This attribute will be in the DBF file</span>
<span class="c1"># of your shapefile (it will be different for each data format). In this</span>
<span class="c1"># example the shapefile states_ugl has an associated database</span>
<span class="c1"># (states_ugl.dbf) that contains an attribute called "CLASS". You will be</span>
<span class="c1"># using two values in the CLASS attribute to separate the classes (also</span>
<span class="c1"># called themes) used in this layer--land and water. CLASSITEM is used in</span>
<span class="c1"># association with the EXPRESSION parameter in the CLASS object. See below.</span>
<span class="k">CLASSITEM</span> <span class="s">"CLASS"</span>
<span class="c1"># Just like CLASSITEM, LABELITEM defines the database attribute that you</span>
<span class="c1"># will be using to draw labels. In this case, the values of the attribute</span>
<span class="c1"># "STATE" will be used to label the states polygons.</span>
<span class="k">LABELITEM</span> <span class="s">"STATE"</span>
<span class="c1"># The class object is defined within the layer object. You can define as</span>
<span class="c1"># many classes as you need (well, there are limits as with layers, but it's</span>
<span class="c1"># senseless to define more than ten on a "normal" layer. There are</span>
<span class="c1"># situations, however, where you might have to do it.)</span>
<span class="k">CLASS</span>
<span class="k">NAME</span> <span class="s">'States'</span>
<span class="k">EXPRESSION</span> <span class="s">'land'</span>
<span class="c1"># There are styles in a class, just like there are classes in a layer,</span>
<span class="c1"># just like there are layers in a map. You can define multiple styles in</span>
<span class="c1"># a class just as you can define multiple classes in a layer and multiple</span>
<span class="c1"># layers in a map.</span>
<span class="k">STYLE</span>
<span class="k">COLOR</span> <span class="mi">232</span> <span class="mi">232</span> <span class="mi">232</span>
<span class="k">END</span>
<span class="c1"># There can be labels in a class, just like there are classes in a layer,</span>
<span class="c1"># just like there are layers in a map. You can define multiple labels in</span>
<span class="c1"># a class just as you can define multiple classes in a layer and multiple</span>
<span class="c1"># layers in a map.</span>
<span class="c1"># MapServer has a very flexible labeling system. With that flexibility</span>
<span class="c1"># comes complexity, specially when using truetype fonts. Please read</span>
<span class="c1"># through the LABEL section of the MapServer map file documentation at</span>
<span class="c1"># https://mapserver.org/mapfile for more information.</span>
<span class="k">LABEL</span>
<span class="k">COLOR</span> <span class="mi">132</span> <span class="mi">31</span> <span class="mi">31</span>
<span class="k">SHADOWCOLOR</span> <span class="mi">218</span> <span class="mi">218</span> <span class="mi">218</span>
<span class="k">SHADOWSIZE</span> <span class="mi">2</span> <span class="mi">2</span>
<span class="k">TYPE</span> <span class="nb">TRUETYPE</span>
<span class="k">FONT</span> <span class="err">arial</span><span class="p">-</span><span class="err">bold</span>
<span class="k">SIZE</span> <span class="mi">12</span>
<span class="k">ANTIALIAS</span> <span class="nb">TRUE</span>
<span class="k">POSITION</span> <span class="nb">CL</span>
<span class="k">PARTIALS</span> <span class="nb">FALSE</span>
<span class="k">MINDISTANCE</span> <span class="mi">300</span>
<span class="k">BUFFER</span> <span class="mi">4</span>
<span class="k">END</span> <span class="c1"># end of label</span>
<span class="k">END</span>
<span class="k">END</span> <span class="c1"># States polygon layer ends here</span>
<span class="c1"># In addition to vector data (shapefiles are vector data), MapServer supports</span>
<span class="c1"># a host of raster formats. In GIS world, one of the most common raster</span>
<span class="c1"># formats is GeoTIFF, a TIFF image with geospatial headers. MapServer also</span>
<span class="c1"># supports JPEG, PNG, GIF, and other common formats. Other raster formats</span>
<span class="c1"># supported by MapServer include ESRI Arc/Info grid, HDF and HDF-EOS, NetCDF,</span>
<span class="c1"># Generic raster binaries, OGC Web Map Service (WMS) layers, etc. Pretty much</span>
<span class="c1"># any raster format you can think of is probably supported, thanks to the</span>
<span class="c1"># impressive Geospatial Data Abstraction Library (GDAL, pronounced "GOODALL"</span>
<span class="c1"># or GOODLE?). More information on GDAL is available at http://www.gdal.org.</span>
<span class="c1">#</span>
<span class="c1"># MapServer can read and display bitmapped (like GIFs), RGB/A (true</span>
<span class="c1"># color), and multispectral (images with more than 3 bands, like raw LandSat</span>
<span class="c1"># images) rasters.</span>
<span class="k">LAYER</span> <span class="c1"># MODIS raster layer begins here</span>
<span class="k">NAME</span> <span class="s">"modis"</span>
<span class="k">DATA</span> <span class="s">"raster/mod09a12003161_ugl_ll_8bit.tif"</span>
<span class="k">STATUS</span> <span class="nb">OFF</span>
<span class="k">TYPE</span> <span class="nb">RASTER</span>
<span class="k">PROCESSING</span> <span class="s">"BANDS=1,2,3"</span>
<span class="k">OFFSITE</span> <span class="mi">71</span> <span class="mi">74</span> <span class="mi">65</span>
<span class="k">PROJECTION</span>
<span class="s">"init=epsg:4326"</span>
<span class="k">END</span>
<span class="k">END</span> <span class="c1"># MODIS raster layer ends here</span>
<span class="k">LAYER</span> <span class="c1"># States line layer begins here</span>
<span class="k">NAME</span> <span class="s">"states"</span>
<span class="k">DATA</span> <span class="s">"states_ugl.shp"</span>
<span class="k">STATUS</span> <span class="nb">OFF</span>
<span class="k">TYPE</span> <span class="nb">LINE</span>
<span class="k">PROJECTION</span>
<span class="s">"init=epsg:4326"</span>
<span class="k">END</span>
<span class="k">CLASSITEM</span> <span class="s">"CLASS"</span>
<span class="k">CLASS</span>
<span class="k">NAME</span> <span class="s">'State Boundary'</span>
<span class="k">EXPRESSION</span> <span class="s">'land'</span>
<span class="k">STYLE</span>
<span class="k">SYMBOL</span> <span class="s">'line5'</span>
<span class="k">COLOR</span> <span class="mi">64</span> <span class="mi">64</span> <span class="mi">64</span>
<span class="k">SIZE</span> <span class="mi">1</span>
<span class="k">END</span>
<span class="k">END</span>
<span class="k">END</span> <span class="c1"># States line layer ends here</span>
<span class="c1"># End of LAYER DEFINITIONS -------------------------------</span>
<span class="k">END</span> <span class="c1"># All map files must come to an end just as all other things must come to...</span>
</pre></div>
</div>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Σύντομη αναζήτηση</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Πάμε" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p>
<a href="../about.html" title="About">About</a><br>
<a href="../products.html" title="Products">Products</a><br>
<a href="../community/index.html" title="Community">Community</a><br>
<a href="../development/index.html" title="Development">Development</a><br>
<a href="../download.html" title="Downloads">Downloads</a><br>
<a href="../documentation.html" title="Documentation">Documentation</a><br>
<a href="../faq.html" title="FAQ">FAQ</a><br>
<a href="../psc.html" title="PSC">PSC</a><br>
<a href="https://fosstodon.org/@mapserver" title="Mastodon">Mastodon</a>
</p>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<h3>Πλοήγηση</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="Κεντρικό Ευρετήριοο"
>ευρετήριο</a></li>
<li class="nav-item nav-item-0"><a href="../index.html">Home</a> »</li>
<li class="nav-item nav-item-this"><a href="">Example1-6.map</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© <a href="../copyright.html">Copyright</a> 2026, Open Source Geospatial Foundation.
Τελευταία ενημέρωση στις 2026-04-20.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 9.1.0.
</div>
</body>
</html>