1 |
jschuengel |
2241 |
|
2 |
|
|
UMN MapServer Extension for Thuban |
3 |
|
|
=================================== |
4 |
|
|
|
5 |
|
|
*** ATTENTION: *** |
6 |
|
|
|
7 |
|
|
The installation instructions here are detailed, so I hope everybody |
8 |
|
|
can install the extension. People who are experienced will know |
9 |
|
|
most of the commands, but everybody should be able to use |
10 |
|
|
this extension. |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
Summary |
15 |
|
|
-------------------- |
16 |
|
|
|
17 |
|
|
This extension for Thuban allows you to handle UMN MapServer .map-files. |
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
Requirements |
22 |
|
|
-------------------- |
23 |
|
|
|
24 |
|
|
To use the UMN MapServer extension you need: |
25 |
|
|
|
26 |
|
|
UMN MapServer python-mapscript |
27 |
|
|
|
28 |
|
|
The extension was tested with UMN MapServer 4.0 and 4.2, |
29 |
|
|
older versions may not work. |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
Installation |
34 |
|
|
-------------------- |
35 |
|
|
|
36 |
|
|
1. You need to build and install python-mapscript if you haven't installed yet. |
37 |
|
|
|
38 |
|
|
Download the UMN MapServer (http://mapserver.gis.umn.edu/dload.html) |
39 |
|
|
or use one on your system. The mapscript is included in the source package. |
40 |
|
|
|
41 |
jan |
2290 |
Unpack and compile the UMN MapServer and use the following optional |
42 |
|
|
parameters: |
43 |
|
|
|
44 |
|
|
proj: include projection support |
45 |
|
|
gdal: include raster support |
46 |
|
|
tiff: include tiff support |
47 |
|
|
|
48 |
|
|
In some cases gdal is not necessary and mapscript can install without |
49 |
|
|
gdal support. |
50 |
jschuengel |
2241 |
A detailed install instruction can be found on the UMN MapServer Homepage. |
51 |
jschuengel |
2248 |
(http://mapserver.gis.umn.edu) |
52 |
jschuengel |
2241 |
|
53 |
|
|
Go to the directory where the UMN MapServer source code tar-ball exists: |
54 |
|
|
|
55 |
|
|
tar -zxf mapserver-4.2.0.tar.gz |
56 |
|
|
|
57 |
|
|
Go to the new created directory: |
58 |
|
|
|
59 |
|
|
cd mapserver-4.2.0 |
60 |
|
|
|
61 |
|
|
Configure an make the UMN MapServer |
62 |
|
|
|
63 |
jschuengel |
2254 |
./configure --with-gdal --with-proj --with-tiff |
64 |
jschuengel |
2241 |
make |
65 |
|
|
|
66 |
|
|
Now we can compile and install the python mapscript |
67 |
|
|
|
68 |
|
|
cd mapscript/python/ |
69 |
|
|
python setup.py build |
70 |
|
|
|
71 |
jschuengel |
2248 |
Some warnings are ok during the build of python mapscript |
72 |
jschuengel |
2241 |
|
73 |
jan |
2290 |
At last we either install mapscript as root: |
74 |
jschuengel |
2241 |
|
75 |
|
|
python setup.py install |
76 |
|
|
|
77 |
jan |
2290 |
or (if you don't want to pollute your system with circumventing |
78 |
|
|
the package installation system) you may set something |
79 |
|
|
like this (not that the exact path depends on your system and |
80 |
|
|
where you place the mapserver sources) for testing the stuff |
81 |
|
|
temporarily: |
82 |
|
|
|
83 |
|
|
export PYTHONPATH=~/mapserver-4.2.0/mapscript/python/build/lib.linux-i686-2.3 |
84 |
|
|
|
85 |
jschuengel |
2261 |
2. Add the umn_mapserver extension import statements to ~/.thuban/thubanstart.py |
86 |
jschuengel |
2241 |
if you run thuban directly from the source directory the statement is: |
87 |
|
|
|
88 |
|
|
import Extensions.umn_mapserver.mf_import |
89 |
jan |
2290 |
import Extensions.umn_mapserver.mf_export |
90 |
|
|
import Extensions.umn_mapserver.mf_handle |
91 |
jschuengel |
2241 |
|
92 |
|
|
More about how to use an extension |
93 |
|
|
see README in thuban/Examples/simple_extensions. |
94 |
|
|
|
95 |
|
|
3. Start Thuban and use the extension. |
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
Usage |
100 |
|
|
-------------------- |
101 |
|
|
|
102 |
|
|
The usage of the extension is very intuitive, so you will see what you can do |
103 |
|
|
while you are using the extension ;) |