Download MapServer User`s Manual

Transcript
MapServer User's Manual
Table of Contents
1 Introduction............................................................................................................................................4
2 Getting Started.......................................................................................................................................4
2.1 Installing.........................................................................................................................................4
2.1.1 Windows.................................................................................................................................4
2.1.2 Unix........................................................................................................................................9
2.1.3 Mac OS X...............................................................................................................................9
2.2 Architecture of MapServer...........................................................................................................10
2.2.1 Supporting Libraries.............................................................................................................11
3 Preparing Your Data.............................................................................................................................11
3.1 Supported Formats........................................................................................................................11
3.1.1 Raster Formats......................................................................................................................12
3.1.2 Vector Formats......................................................................................................................15
3.2 The .Map File...............................................................................................................................16
3.2.1 Important Notes....................................................................................................................17
3.2.2 Example Objects...................................................................................................................18
3.2.3 CLASS Expressions.............................................................................................................24
3.2.4 Mapfile Includes...................................................................................................................24
3.2.5 Mapfile Creation Tools.........................................................................................................26
3.3 MapServer Utilities......................................................................................................................27
3.3.1 legend....................................................................................................................................28
3.3.2 msencrypt..............................................................................................................................28
3.3.3 scalebar.................................................................................................................................30
3.3.4 shp2img................................................................................................................................30
3.3.5 shptree...................................................................................................................................32
3.3.6 shptreevis..............................................................................................................................33
3.3.7 sortshp...................................................................................................................................34
3.3.8 tile4ms..................................................................................................................................36
3.4 GDAL/OGR Utilities...................................................................................................................40
3.4.1 ogrinfo..................................................................................................................................40
3.4.2 ogr2ogr..................................................................................................................................42
3.4.3 ogrtindex...............................................................................................................................43
3.4.4 gdalinfo.................................................................................................................................44
3.4.5 gdaladdo................................................................................................................................45
3.4.6 gdaltindex.............................................................................................................................46
3.4.7 gdal_translate........................................................................................................................47
3.4.8 gdalwarp...............................................................................................................................48
3.5 Projections....................................................................................................................................50
3.5.1 PROJ.4..................................................................................................................................50
3.5.2 EPSG Codes.........................................................................................................................50
3.5.3 MapServer and Projections...................................................................................................51
3.6 Tips and Tricks.............................................................................................................................53
3.6.1 Rules for Preparing Data for MapServer..............................................................................53
3.6.2 Labelling...............................................................................................................................54
Page 2 of 134