1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
2 |
<!DOCTYPE book |
3 |
PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
4 |
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" |
5 |
[<!ENTITY imgscale "60">]> |
6 |
<!-- $Revision$ --> |
7 |
<book> |
8 |
<bookinfo> |
9 |
<title>Benutzerhandbuch für Thuban 1.0</title> |
10 |
<authorgroup> |
11 |
<author> |
12 |
<firstname>Jonathan</firstname><surname>Coles</surname> |
13 |
</author> |
14 |
<author> |
15 |
<firstname>Jan-Oliver</firstname><surname>Wagner</surname> |
16 |
</author> |
17 |
<author> |
18 |
<firstname>Frank</firstname><surname>Koormann</surname> |
19 |
</author> |
20 |
</authorgroup> |
21 |
<copyright> |
22 |
<year>2004</year> |
23 |
<holder>Intevation GmbH</holder> |
24 |
</copyright> |
25 |
<revhistory> |
26 |
<!-- comment this first revision out when releasing a real version --> |
27 |
<revision> |
28 |
<revnumber>CVS version $Id$</revnumber> |
29 |
<date></date> |
30 |
<revremark>Under development.</revremark> |
31 |
</revision> |
32 |
<!-- |
33 |
<revision> |
34 |
<revnumber>1.0.0</revnumber> |
35 |
<date>nn-Mmm-2004</date> |
36 |
<revremark> |
37 |
Corresponds to Thuban 1.0.0. |
38 |
</revremark> |
39 |
</revision> |
40 |
--> |
41 |
</revhistory> |
42 |
|
43 |
</bookinfo> |
44 |
|
45 |
<chapter><title>Einführung</title> |
46 |
<para> |
47 |
Thuban ist ein interaktiver Geodaten-Betrachter. |
48 |
Die Entwicklung wurde seinerzeit gestartet, da es zu dieser Zeit |
49 |
keinen einfachen interkativen Betrachter für Geo-Daten als Freie |
50 |
Software gab. |
51 |
Thuban ist im wesentlichen in der Programmiersprache Python implementiert und |
52 |
nutzt die wxWidgets (ehemals: wxWindows) Bibliothek die es erlaubt |
53 |
Thuban auf verschiedenen Plattformen laufen zu lassen, darunter GNU/Linux |
54 |
und Windows. |
55 |
</para> |
56 |
<para> |
57 |
Geodatenbetrachter sind wichtige Werkzeuge die es gestatten, einen visuelle |
58 |
Eindruck des räumlichen (gegenseiten) Bezuges von Informationen zu bekommen |
59 |
die ansonsten anhand der reinen Daten nicht leicht ersichtlich sind. |
60 |
Thuban erlaubt dem Benutzer, Sitzungen zu erzeugen, die geografische |
61 |
Daten darstellen. Diese können dann erforscht werden indem er durch sie |
62 |
sie navigieren und die Art der Darstellung ändern kann. |
63 |
Die Ergebnisse können gespeichert oder gedruckt werden. |
64 |
</para> |
65 |
<para> |
66 |
Thuban strukturiert eine Sitzung hierarchisch. |
67 |
Eine Sitzung besteht aus Ebenen. Jede Ebene rerpäsentiert |
68 |
einen bestimmten Datensatz. |
69 |
Beispielsweise eine Ebene für Strassen und eine weitere für Gebäude. |
70 |
Die Ebenen können sowohl Vektor-Daten beschreiben als auch Raster-Daten. |
71 |
</para> |
72 |
|
73 |
<section><title>Installation</title> |
74 |
<para> |
75 |
Thuban is actively supported under Debian Testing (sarge), RedHat 7.2, |
76 |
and Windows 2000. Thuban depends on the following packages. These |
77 |
packages can also be found on the |
78 |
<ulink url="http://thuban.intevation.org/download.html"> |
79 |
Thuban Download site |
80 |
</ulink>. |
81 |
</para> |
82 |
<para> |
83 |
Required: |
84 |
<itemizedlist> |
85 |
<listitem><para>Python 2.2.1 |
86 |
(<literal>http://www.python.org</literal>) |
87 |
</para></listitem> |
88 |
<listitem><para>wxWindows 2.4 |
89 |
(<literal>http://www.wxwindows.org</literal>) |
90 |
</para></listitem> |
91 |
<listitem><para>wxPython 2.4 |
92 |
(<literal>http://www.wxpython.org</literal>) |
93 |
</para></listitem> |
94 |
<listitem><para>proj 4.4.5 Projection Library |
95 |
(<literal>http://www.remotesensing.org/proj/</literal>) |
96 |
</para></listitem> |
97 |
<listitem><para>SQLite 2.8.3 |
98 |
<literal>http://www.hwaci.com/sw/sqlite/</literal>) |
99 |
</para></listitem> |
100 |
<listitem><para>PySQLite 0.4.3 |
101 |
(<literal>http://pysqlite.sourceforge.net</literal>) |
102 |
</para></listitem> |
103 |
</itemizedlist> |
104 |
</para> |
105 |
<para> |
106 |
Optional: |
107 |
<itemizedlist> |
108 |
<listitem><para>GDAL 1.1.8 |
109 |
(<literal>http://www.remotesensing.org/gdal/</literal>) |
110 |
</para></listitem> |
111 |
<listitem><para>psycopg 1.0.8 |
112 |
(<literal>http://initd.org/software/psycopg</literal>) |
113 |
</para></listitem> |
114 |
</itemizedlist> |
115 |
</para> |
116 |
<para> |
117 |
Along with the source codes, the download page also offers full |
118 |
installation packages for Debian, Windows and RPM-based systems |
119 |
(Mandrake, RedHat, SuSE, etc). |
120 |
</para> |
121 |
<section><title>RPM-based GNU/Linux Systems</title> |
122 |
<section><title>Installing Binary Packages</title> |
123 |
<para> |
124 |
The most wide-spread RPM-based GNU/Linux |
125 |
Systems are RedHat, Mandrake and SuSE. |
126 |
The documentation of these distributions |
127 |
should contain information about how to |
128 |
install third-party RPM packages. |
129 |
Nonetheless, a short summary is provided here. |
130 |
</para> |
131 |
<para> |
132 |
RPM packages can be installed applying several |
133 |
tools. The most basic one is the command line |
134 |
program "rpm". The hardware architecture is |
135 |
identified in the name of RPM packages, eg. |
136 |
'i386' for most Intel/AMD architectures. |
137 |
If you have a different hardware architecture, |
138 |
where no binary RPM packages are provided, |
139 |
you must rebuild binary packages from the |
140 |
RPM source packages first (see below). |
141 |
Typical rpm commands look like: |
142 |
|
143 |
<programlisting> |
144 |
rpm --install Thuban-0.9.0-1.i386.rpm |
145 |
</programlisting> |
146 |
|
147 |
Depending on what you already have installed |
148 |
on your system, you are informed that some |
149 |
packages are required, but not installed. |
150 |
You need to install them first. Either they |
151 |
are provided by your GNU/Linux distributor |
152 |
or available somewhere on the Internet. |
153 |
The more essential and special ones are |
154 |
provided together with the Thuban package. |
155 |
</para> |
156 |
|
157 |
<para> |
158 |
For rpm exist some graphical user interfaces, notably |
159 |
kpackage, GnoRPM and xrpm. |
160 |
</para> |
161 |
|
162 |
<para> |
163 |
Make yourself familiar with one of the tools and apply it |
164 |
to install the packages. |
165 |
Note, that you need to be administrator (root) for the system |
166 |
to do that. |
167 |
</para> |
168 |
</section> |
169 |
<section><title>Build Binaries from Source Packages</title> |
170 |
<para> |
171 |
This section describes howto build RPM install-packages |
172 |
from RPM source-packages. |
173 |
This adapts and optimizes an install-package specifically |
174 |
to your system. |
175 |
This is especially helpful to resolve version conflicts of |
176 |
dependent packages. Furthermore, install-packages for other |
177 |
platforms (e.g. PowerPC) can be created. |
178 |
</para> |
179 |
|
180 |
<para> |
181 |
Note: rpm must be at least version 4. Execute |
182 |
<literal>rpm --version</literal> to find out about the version. |
183 |
</para> |
184 |
|
185 |
<para> |
186 |
You need to do the following preparations to be able to |
187 |
build the packages as a regular user. You should now |
188 |
perform the package buling as root since this |
189 |
might cause damage to your system. |
190 |
<itemizedlist> |
191 |
<listitem> |
192 |
<para> |
193 |
Create RPM directory structure: |
194 |
Choose a directory (e.g. $HOME/myrpm) and create the |
195 |
subdirectories BUILD, RPM, SOURCES, SPECS and SRPMS. |
196 |
A possible command sequence for this is: |
197 |
<programlisting> |
198 |
mkdir $HOME/freegisrpm |
199 |
cd $HOME/freegisrpm |
200 |
mkdir BUILD RPMS SOURCES SPECS SRPMS |
201 |
</programlisting> |
202 |
</para> |
203 |
</listitem> |
204 |
<listitem> |
205 |
<para> |
206 |
Set environment variable RPM_DIR: |
207 |
<programlisting> |
208 |
export RPM_DIR=$HOME/freegisrpm |
209 |
</programlisting> |
210 |
</para> |
211 |
</listitem> |
212 |
<listitem> |
213 |
<para> |
214 |
Create $HOME/.rpmmacros: |
215 |
This file sets general preferences and some |
216 |
specific settings for signing packages. |
217 |
If you don't have a GnuPG-key, you can skip |
218 |
the signature settings i.e. drop the last 4 lines. |
219 |
A signature becomes important when you want to |
220 |
give away packages to third parties. |
221 |
<programlisting> |
222 |
<![CDATA[ |
223 |
%packager Name Lastname <[email protected]> |
224 |
|
225 |
%_topdir /home/mylogin/myrpm |
226 |
|
227 |
%_signature gpg |
228 |
%_gpg_name Name Lastname |
229 |
%_pgp_path ~/.gnupg |
230 |
%_pgpbin /usr/bin/gpg |
231 |
]]> |
232 |
</programlisting> |
233 |
</para> |
234 |
</listitem> |
235 |
</itemizedlist> |
236 |
|
237 |
Now you can install any RPM source-package. |
238 |
It's components are installed into the corresponding |
239 |
subdirectories of your rpm-directory. |
240 |
Essentially these are the sources (into directory SOURCES) |
241 |
and the so-called spec-file which contains all build |
242 |
instructions. The spec-file will go into the SPEC directory. |
243 |
Example: |
244 |
<literal>rpm --install Thuban-0.9.0-1.src.rpm</literal> |
245 |
</para> |
246 |
|
247 |
<para> |
248 |
Create install-package: |
249 |
Go to the directory with the spec-files and rebuild the |
250 |
package: |
251 |
<programlisting> |
252 |
cd $HOME/mypm/SPECS |
253 |
rpm -bb thuban.spec |
254 |
</programlisting> |
255 |
Next, you will find the newly created package in |
256 |
$HOME/myrpm/RPMS/i386. |
257 |
If you build the package for another architecture than |
258 |
i386, then the name of the directory has a corresponding name. |
259 |
</para> |
260 |
<para> |
261 |
For documentation of RPM, either type |
262 |
<literal>man rpm</literal> or <literal>rpm --help</literal>. |
263 |
This will provide you with information on the various command |
264 |
line options of RPM. |
265 |
For more information see the |
266 |
<ulink url="http://www.rpm.org/">homepage of RPM</ulink>. |
267 |
</para> |
268 |
</section> |
269 |
</section> <!-- Intro - Installation - RPM--> |
270 |
|
271 |
<section><title>Win32 Systems</title> |
272 |
<para> |
273 |
A common installation package of Thuban for Win32 |
274 |
systems is available from the Thuban website download |
275 |
section. This installation package is configured for |
276 |
displaying file based vector data (Shapefiles). For the |
277 |
display of raster data or the connection to spatial |
278 |
databases additional steps are needed. |
279 |
</para> |
280 |
<para> |
281 |
The required Python packages are listed and linked on |
282 |
the download page as well. If you don't have Python |
283 |
installed already, download the packages for Python, |
284 |
wxPython for Python and the SQLite Python Libraries as |
285 |
well as the Thuban package. Install all four packages |
286 |
in the order: Python, wxPython, SQLite, Thuban. Follow |
287 |
the installation instructions provided by the seperate |
288 |
setups. The Thuban installation package will add an |
289 |
entry in the menu folder you configured. |
290 |
</para> |
291 |
<section><title>Raster Data: Installation of GDAL</title> |
292 |
<para> |
293 |
Enabling the raster data features of Thuban is |
294 |
straight forward. For the examples we assume that |
295 |
Thuban has been installed under |
296 |
<literal>C:\Thuban</literal>: |
297 |
<itemizedlist> |
298 |
<listitem> |
299 |
<para> |
300 |
Download the zip-archive <ulink |
301 |
url="ftp://intevation.de/thuban/win2k/gdal-win2k.zip" |
302 |
>gdal-win2k</ulink>. |
303 |
</para></listitem> |
304 |
<listitem><para>Extract the archive (e.g. with |
305 |
<ulink |
306 |
url="http://www.info-zip.org/pub/infozip/WiZ.html" |
307 |
>WiZ (InfoZip)</ulink>) into the |
308 |
<literal>C:\Thuban\Lib</literal> |
309 |
directory of your Thuban installation. |
310 |
</para> |
311 |
</listitem> |
312 |
<listitem> |
313 |
<para> |
314 |
Extent the <varname>PYTHONPATH</varname> |
315 |
environment variable (in your Windows Control Panel) |
316 |
to make the new libraries available for Thuban. |
317 |
<programlisting> |
318 |
%PYTHONPATH%;C:\Thuban\Lib\gdal;C:\Thuban\Lib\gdal\pymod |
319 |
</programlisting> |
320 |
</para> |
321 |
</listitem> |
322 |
<listitem> |
323 |
<para> |
324 |
Extent also the <varname>PATH</varname> |
325 |
environment variable accordingly: |
326 |
<programlisting> |
327 |
%PATH%;C:\Thuban\Lib\gdal |
328 |
</programlisting> |
329 |
</para> |
330 |
</listitem> |
331 |
</itemizedlist> |
332 |
After this installation steps Thuban is ready to |
333 |
display raster data (e.g. the |
334 |
<literal>island.tif</literal> from the Iceland Demo |
335 |
data set. |
336 |
</para> |
337 |
</section> <!-- Win32: GDAL--> |
338 |
|
339 |
<section><title>Working with PostGIS: Installation of PsycoPG</title> |
340 |
<para> |
341 |
To access PostgreSQL/PostGIS spatial databases with |
342 |
Thuban you have to install the PsycoPG package for |
343 |
Windows: |
344 |
<itemizedlist> |
345 |
<listitem> |
346 |
<para> |
347 |
Download the zip-archive |
348 |
<ulink |
349 |
url="http://stickpeople.com/projects/python/win-psycopg/win-psycopg22.zip" |
350 |
>win-psycopg22.zip</ulink>. |
351 |
</para> |
352 |
</listitem> |
353 |
<listitem> |
354 |
<para> |
355 |
Extract the zip-archive into a directory either already |
356 |
in your <varname>PYTHONPATH</varname> or extent your |
357 |
<varname>PYTHONPATH</varname> variable to the directory |
358 |
you have extracted the archive to. |
359 |
</para> |
360 |
</listitem> |
361 |
</itemizedlist> |
362 |
For installation and maintenance of spatial databases |
363 |
we refer to the <ulink |
364 |
url="http://postgis.refractions.net" |
365 |
>PostGIS Homepage</ulink>. |
366 |
</para> |
367 |
</section> <!-- Win32: PsycoPG--> |
368 |
|
369 |
</section> <!-- Intro - Installation - Win32 --> |
370 |
</section> |
371 |
|
372 |
<section><title>Internationalisierung</title> |
373 |
<para> |
374 |
Thuban ist mit Unterstützung für Internaionalisierung realisiert. |
375 |
Bisher wurde Thuban in folgende Sprachen (neben der Basis Englisch) übersetzt: |
376 |
<itemizedlist> |
377 |
<listitem><para>Französisch</para></listitem> |
378 |
<listitem><para>Deutsch</para></listitem> |
379 |
<listitem><para>Italienisch</para></listitem> |
380 |
<listitem><para>Portugiesisch (Brasilien)</para></listitem> |
381 |
<listitem><para>Russisch</para></listitem> |
382 |
<listitem><para>Spanisch</para></listitem> |
383 |
</itemizedlist> |
384 |
</para> |
385 |
|
386 |
<para> |
387 |
Um die Internationalisierung auf POSIX Systemen (wie etwa GNU/Linux) |
388 |
zu verwenden, muss die Umgebungsvariable LC_ALL entsprechend |
389 |
gesetzt werden (z.B. LC_ALL=de_DE für Deutsch). |
390 |
Prüfen Sie die Dokumentation zu Ihrem System für Details |
391 |
und die unterstützten Einstellungen. |
392 |
Normalweise haben Sie Ihre Sprache bereits mit der Installation |
393 |
oder beim einloggen bereits vorausgewählt. |
394 |
Trotzdem kann auch dann noch durch Setzen von LC_ALL auf |
395 |
der Kommandozeile beim Aufruf von Thuban eine andere Sprache |
396 |
gesetzt werden: |
397 |
</para> |
398 |
<programlisting> |
399 |
LC_ALL=fr_FR thuban.py |
400 |
</programlisting> |
401 |
|
402 |
<para> |
403 |
MS Windows Benutzer müssen die Sprache über die Kontroll-Leiste einstellen |
404 |
welche grundsätzlich alle Anwendungen beeinflusst. |
405 |
</para> |
406 |
</section> |
407 |
|
408 |
<section><title>Das Hauptfenster</title> |
409 |
<para> |
410 |
<figure><title>Das Hauptfenster</title> |
411 |
<mediaobject> |
412 |
<imageobject> <imagedata fileref="../images/1_2_mainwindow.png" format="PNG" scale="&imgscale;"/> </imageobject> |
413 |
<imageobject> <imagedata fileref="./images/1_2_mainwindow.ps" format="EPS" scale="&imgscale;"/> </imageobject> |
414 |
</mediaobject> |
415 |
</figure> |
416 |
</para> |
417 |
|
418 |
<para> |
419 |
Das Hauptfenster stellt die aktuelle Karte dar. Hier kann der |
420 |
Benutzer mit der Karte interagieren indem er die verschiednen |
421 |
Werkzeuge anwendet. |
422 |
</para> |
423 |
|
424 |
<para> |
425 |
Die Legende auf der linken Seite zeigt eine Liste der aktuellen |
426 |
Ebenen und alle dargestellten Klassifikations-Gruppen. |
427 |
Bei diesem Beispiel haben alle Geo-Objekte Ebenen eine voreingestellte |
428 |
Klassifizierung wie die jeweiligen Geo-Objekte in den einzelnen |
429 |
Ebenen gezeichnet werden sollen. |
430 |
Die Ebenen die weiter oben in der Liste dargestellt werden über |
431 |
die darunter aufgelisteten gezeichnet. |
432 |
Die Legende kann durch Anwahl des X in der oberen rechten Ecke |
433 |
geschlossen werden. |
434 |
Um die Legenden-Ansicht wieder zu öffnen, wählen Sie |
435 |
<menuchoice> |
436 |
<guimenu>Karte</guimenu> |
437 |
<guimenuitem>Legende</guimenuitem> |
438 |
</menuchoice>. |
439 |
The legend is also dockable, which means that it can be detached |
440 |
from the main window by clicking on the small button next to the |
441 |
close button. It can be attached by clicking the same button |
442 |
again. |
443 |
</para> |
444 |
<para> |
445 |
The status bar displays different information depending on the |
446 |
current context. If the user is selecting an item from the menu |
447 |
then the status bar will display a short help message indicating |
448 |
what each menu item is for. If the user has a tool selected then |
449 |
the position of the cursor on the map is displayed. |
450 |
</para> |
451 |
<para> |
452 |
The tool bar provides quick access to the commonly needed tools. |
453 |
By hovering over each button the user can see a short messages |
454 |
describing what the tool does. The tools provided are Zoom In, Zoom |
455 |
Out, Pan, Full Extent, Full Layer Extent, Full Shape Extent, Identify, |
456 |
and Label. Each of the tools will be explained in further detail later |
457 |
in the manual. |
458 |
</para> |
459 |
</section> |
460 |
|
461 |
</chapter> |
462 |
|
463 |
<chapter><title>Session Management</title> |
464 |
|
465 |
<section><title>Starting a New Session</title> |
466 |
<para> |
467 |
A new session can be started from |
468 |
<menuchoice> |
469 |
<guimenu>File</guimenu> |
470 |
<guimenuitem>New Session</guimenuitem> |
471 |
</menuchoice>. |
472 |
If a session is already loaded and has been modified without |
473 |
being saved a prompt will ask if the current session should |
474 |
be saved. A new session consists of an empty map with no |
475 |
layers and no tables. |
476 |
</para> |
477 |
</section> |
478 |
|
479 |
<section><title>Opening a Session</title> |
480 |
<para> |
481 |
A session can be opened from |
482 |
<menuchoice> |
483 |
<guimenu>File</guimenu> |
484 |
<guimenuitem>Open Session</guimenuitem> |
485 |
</menuchoice>. A dialog box will open allowing the user to browse |
486 |
for a Thuban Session file. Thuban session files end with |
487 |
<varname>.thuban</varname>. Selecting a file a clicking |
488 |
<guibutton>OK</guibutton> will load the session into Thuban. |
489 |
|
490 |
If a session is already loaded and has been modified without |
491 |
being saved a prompt will ask if the current session should |
492 |
be saved. |
493 |
</para> |
494 |
</section> |
495 |
|
496 |
<section><title>Saving a Session</title> |
497 |
<para> |
498 |
A session can be saved from |
499 |
<menuchoice> |
500 |
<guimenu>File</guimenu> |
501 |
<guimenuitem>Save Session</guimenuitem> |
502 |
</menuchoice>. A dialog box will open allowing the user to browse |
503 |
the file system and select a place to save the session. Thuban |
504 |
sessions should be saved under a name ending in |
505 |
<varname>.thuban</varname>. If the file already exists the user |
506 |
will be prompted to save under a different name or overwrite the |
507 |
existing file. |
508 |
</para> |
509 |
</section> |
510 |
|
511 |
<section><title>The Session Info-Tree</title> |
512 |
<para> |
513 |
<figure> |
514 |
<title>Session Info Tree</title> |
515 |
<mediaobject> |
516 |
<imageobject><imagedata fileref="../images/2_4_session_tree.png" format="PNG" scale="&imgscale;"/></imageobject> |
517 |
<imageobject><imagedata fileref="./images/2_4_session_tree.eps" format="EPS" scale="&imgscale;"/></imageobject> |
518 |
</mediaobject> |
519 |
</figure> |
520 |
</para> |
521 |
<para> |
522 |
The session info-tree is primarily intended for developers working |
523 |
with Thuban. It displays many of the internal values for the session, |
524 |
map, and layers. It can be opened from |
525 |
<menuchoice> |
526 |
<guimenu>File</guimenu> |
527 |
<guimenuitem>Session Tree</guimenuitem> |
528 |
</menuchoice>. |
529 |
</para> |
530 |
</section> |
531 |
</chapter> |
532 |
|
533 |
<chapter><title>Map Management</title> |
534 |
<para> |
535 |
The map consists of a number of layers where each layer represents a |
536 |
different type of data set. By interacting with the map the user can |
537 |
visually explore the data. |
538 |
</para> |
539 |
<para> |
540 |
The map can have a name that will appear in the Thuban title bar. |
541 |
The map name can be changed using |
542 |
<menuchoice> |
543 |
<guimenu>Map</guimenu> |
544 |
<guimenuitem>Rename</guimenuitem> |
545 |
</menuchoice>. |
546 |
</para> |
547 |
<para> |
548 |
<inlinemediaobject> |
549 |
<imageobject> |
550 |
<imagedata fileref="../images/3_rename_map.png" format="PNG" scale="&imgscale;"/> |
551 |
</imageobject> |
552 |
<imageobject> |
553 |
<imagedata fileref="./images/3_rename_map.eps" format="EPS" scale="&imgscale;"/> |
554 |
</imageobject> |
555 |
<textobject> <phrase>Rename Map</phrase> </textobject> |
556 |
</inlinemediaobject> |
557 |
</para> |
558 |
|
559 |
<section><title>Adding and Removing Layers</title> |
560 |
<para> |
561 |
There are three types of layers that can be added to a map: |
562 |
Shape layers, database layers |
563 |
and image layers. Shape layers are stored in Shapefile format, a |
564 |
widely used file format for storing geographic objects. These |
565 |
files have the extension ``.shp''. Associated with |
566 |
the shape file is a database file which stores attributes for |
567 |
each shape in the Shape file. This file, in dBase format, |
568 |
has the extension ``.dbf''. Both files must have the same base name. |
569 |
For example, if there is a shape file named roads.shp there must |
570 |
also be a file roads.dbf. |
571 |
</para> |
572 |
<itemizedlist> |
573 |
<listitem> |
574 |
<para> |
575 |
Shape layers can be added to the map with |
576 |
<menuchoice> |
577 |
<guimenu>Map</guimenu> |
578 |
<guimenuitem>Add Layer</guimenuitem> |
579 |
</menuchoice>. |
580 |
Initially, only the ``.shp'' files are shown which is enough for the |
581 |
selection. However, if you switch to display all files and select one |
582 |
of the associated files (e.g. ``.dbf''), Thuban will recognize the base |
583 |
name and load the corresponding Shape file. |
584 |
</para> |
585 |
<para> |
586 |
The file dialog for Shape files allows to select multiple files. |
587 |
Use the shift-button together with the left mouse button to extend |
588 |
the selection. |
589 |
</para> |
590 |
</listitem> |
591 |
|
592 |
<listitem> |
593 |
<para>Database layers can be added to the map with |
594 |
<menuchoice> |
595 |
<guimenu>Map</guimenu> |
596 |
<guimenuitem>Add Database Layer</guimenuitem> |
597 |
</menuchoice>. |
598 |
A dialog with two is list is opened. The left list displays all |
599 |
database connections currently open for the session. You can retrieve |
600 |
a list of available layers from the selected database which is |
601 |
displayed on the right hand. From this list one layer can be selected, |
602 |
the dialog is closed afterwards. |
603 |
</para> |
604 |
<para> |
605 |
See appendix ``Working with PostGIS'' for details. |
606 |
</para> |
607 |
</listitem> |
608 |
|
609 |
<listitem> |
610 |
<para> |
611 |
Image layers can be added to the map with |
612 |
<menuchoice> |
613 |
<guimenu>Map</guimenu> |
614 |
<guimenuitem>Add Image Layer</guimenuitem> |
615 |
</menuchoice>. |
616 |
It is important to select a valid image file that has geographic |
617 |
data associated with it. The data can be embedded in the file itself, |
618 |
or in another file. If geographic information cannot be found, Thuban |
619 |
will report an error. |
620 |
</para> |
621 |
</listitem> |
622 |
</itemizedlist> |
623 |
</section> |
624 |
|
625 |
<section><title>Navigation</title> |
626 |
<para> |
627 |
The map can be explored by using the navigation tools available on |
628 |
the tool bar or from the |
629 |
<menuchoice><guimenu>Map</guimenu></menuchoice> menu. |
630 |
</para> |
631 |
<itemizedlist> |
632 |
<listitem> |
633 |
<para> |
634 |
The ZoomIn tool |
635 |
<inlinemediaobject> |
636 |
<imageobject> |
637 |
<imagedata fileref="../images/3_2_zoomin.png" format="PNG" scale="&imgscale;"/> |
638 |
</imageobject> |
639 |
<imageobject> |
640 |
<imagedata fileref="./images/3_2_zoomin.eps" format="EPS" scale="&imgscale;"/> |
641 |
</imageobject> |
642 |
<textobject> <phrase>ZoomIn Tool</phrase> </textobject> |
643 |
</inlinemediaobject> |
644 |
enlarges a region of the map. Clicking once on the map |
645 |
will double the magnification and center the map on the point that |
646 |
was clicked. Clicking and dragging selects a region that will be |
647 |
enlarged to fit the window. |
648 |
</para> |
649 |
</listitem> |
650 |
<listitem> |
651 |
<para> |
652 |
The ZoomOut tool |
653 |
<inlinemediaobject> |
654 |
<imageobject> |
655 |
<imagedata fileref="../images/3_2_zoomout.png" format="PNG" scale="&imgscale;"/> |
656 |
</imageobject> |
657 |
<imageobject> |
658 |
<imagedata fileref="./images/3_2_zoomout.eps" format="EPS" scale="&imgscale;"/> |
659 |
</imageobject> |
660 |
<textobject> <phrase>ZoomOut Tool</phrase> </textobject> |
661 |
</inlinemediaobject> |
662 |
shrinks the map so that a larger region is visible. A single click |
663 |
reduces the magnification by a factor of two. Clicking and dragging |
664 |
selects a box such that the current contents of the window will be |
665 |
scaled to fit into that box. |
666 |
</para> |
667 |
</listitem> |
668 |
<listitem> |
669 |
<para> |
670 |
The Pan tool |
671 |
<inlinemediaobject> |
672 |
<imageobject> |
673 |
<imagedata fileref="../images/3_2_pan.png" format="PNG" scale="&imgscale;"/> |
674 |
</imageobject> |
675 |
<imageobject> |
676 |
<imagedata fileref="./images/3_2_pan.eps" format="EPS" scale="&imgscale;"/> |
677 |
</imageobject> |
678 |
<textobject> <phrase>Pan Tool</phrase> </textobject> |
679 |
</inlinemediaobject> |
680 |
allows the user to move the map around by clicking and dragging. |
681 |
</para> |
682 |
</listitem> |
683 |
<listitem> |
684 |
<para> |
685 |
The Full Extent tool |
686 |
<inlinemediaobject> |
687 |
<imageobject> |
688 |
<imagedata fileref="../images/3_2_fullextent.png" format="PNG" scale="&imgscale;"/> |
689 |
</imageobject> |
690 |
<imageobject> |
691 |
<imagedata fileref="./images/3_2_fullextent.eps" format="EPS" scale="&imgscale;"/> |
692 |
</imageobject> |
693 |
<textobject> <phrase>Full Extent Tool</phrase> </textobject> |
694 |
</inlinemediaobject> |
695 |
rescales the viewable region so that the entire map is visible. |
696 |
</para> |
697 |
</listitem> |
698 |
<listitem> |
699 |
<para> |
700 |
The Full Layer Extent tool |
701 |
<inlinemediaobject> |
702 |
<imageobject> |
703 |
<imagedata fileref="../images/3_2_fulllayerextent.png" format="PNG" scale="&imgscale;"/> |
704 |
</imageobject> |
705 |
<imageobject> |
706 |
<imagedata fileref="./images/3_2_fulllayerextent.eps" format="EPS" scale="&imgscale;"/> |
707 |
</imageobject> |
708 |
<textobject> <phrase>Full Layer Extent Tool</phrase> </textobject> |
709 |
</inlinemediaobject> |
710 |
rescales the viewable region so that the currently selected |
711 |
layer fits within the window. If no layer is selected this button |
712 |
will be disabled. |
713 |
</para> |
714 |
</listitem> |
715 |
<listitem> |
716 |
<para> |
717 |
The Full Shape Extent tool |
718 |
<inlinemediaobject> |
719 |
<imageobject> |
720 |
<imagedata fileref="../images/3_2_fullshapeextent.png" format="PNG" scale="&imgscale;"/> |
721 |
</imageobject> |
722 |
<imageobject> |
723 |
<imagedata fileref="./images/3_2_fullshapeextent.eps" format="EPS" scale="&imgscale;"/> |
724 |
</imageobject> |
725 |
<textobject> <phrase>Full Shape Extent Tool</phrase> </textobject> |
726 |
</inlinemediaobject> |
727 |
rescales the viewable region so that the currently selected |
728 |
shape fits within the window. If the shape is a point, it is |
729 |
centered and the map is zoomed all the way in. If no shape is |
730 |
selected this button will be disabled. This feature is especially |
731 |
helpful when identifying an object related to a selected record |
732 |
in a tableview (see below). |
733 |
|
734 |
</para> |
735 |
</listitem> |
736 |
</itemizedlist> |
737 |
</section> |
738 |
|
739 |
<section><title>Object Identification</title> |
740 |
<para> |
741 |
Objects on the map can be identified using the Identify tool |
742 |
<inlinemediaobject> |
743 |
<imageobject> |
744 |
<imagedata fileref="../images/3_3_identify.png" format="PNG" scale="&imgscale;"/> |
745 |
</imageobject> |
746 |
<imageobject> |
747 |
<imagedata fileref="./images/3_3_identify.eps" format="EPS" scale="&imgscale;"/> |
748 |
</imageobject> |
749 |
<textobject> <phrase>Identify Tool</phrase> </textobject> |
750 |
</inlinemediaobject>. |
751 |
Clicking on an object selects that object and opens a dialog which |
752 |
shows all the table attributes for that object. Any current selection |
753 |
is lost. Objects on the map are typically shapes and this document |
754 |
will often refer to objects as shapes. |
755 |
</para> |
756 |
</section> |
757 |
|
758 |
<section><title>Object Labeling</title> |
759 |
<para> |
760 |
Objects can be labeled using the Label tool |
761 |
<inlinemediaobject> |
762 |
<imageobject> |
763 |
<imagedata fileref="../images/3_3_label.png" format="PNG" scale="&imgscale;"/> |
764 |
</imageobject> |
765 |
<imageobject> |
766 |
<imagedata fileref="./images/3_3_label.eps" format="EPS" scale="&imgscale;"/> |
767 |
</imageobject> |
768 |
<textobject> <phrase>Label Tool</phrase> </textobject> |
769 |
</inlinemediaobject>. |
770 |
Clicking on an object selects that object and opens a dialog which |
771 |
displays the table attributes for that object. An attribute can |
772 |
be selected to be the label on the map. The label will be placed |
773 |
at the center of the shape. Clicking on an object that already has |
774 |
a label will remove the label. |
775 |
</para> |
776 |
</section> |
777 |
|
778 |
<section><title>The Legend</title> |
779 |
<para> |
780 |
<inlinemediaobject> |
781 |
<imageobject> |
782 |
<imagedata fileref="../images/3_5_legend.png" format="PNG" scale="&imgscale;"/> |
783 |
</imageobject> |
784 |
<imageobject> |
785 |
<imagedata fileref="./images/3_5_legend.eps" format="EPS" scale="&imgscale;"/> |
786 |
</imageobject> |
787 |
<textobject> <phrase>Legend</phrase> </textobject> |
788 |
</inlinemediaobject> |
789 |
</para> |
790 |
<para> |
791 |
The Legend provides an overview of the layers in the map. Layers |
792 |
that appear higher in the legend will appear ``closer'' to the user. |
793 |
If a layer supports classification (currently, only shape layers |
794 |
have this feature) then the classification groups will be shown |
795 |
below each layer. The properties for each group are also displayed |
796 |
with a small graphic. Polygon layers appear as rectangles, lines |
797 |
appear as curved lines, and points appear as circles. |
798 |
</para> |
799 |
<para> |
800 |
Along the top of the legend is a toolbar which allows quick access |
801 |
to some of the layer manipulation options under |
802 |
<menuchoice><guimenu>Map</guimenu></menuchoice>. |
803 |
</para> |
804 |
|
805 |
<itemizedlist> |
806 |
<listitem> |
807 |
<para> |
808 |
The Move Layer to Top tool |
809 |
<inlinemediaobject> |
810 |
<imageobject> |
811 |
<imagedata fileref="../images/3_5_totop.png" format="PNG" scale="&imgscale;"/> |
812 |
</imageobject> |
813 |
<imageobject> |
814 |
<imagedata fileref="./images/3_5_totop.eps" format="EPS" scale="&imgscale;"/> |
815 |
</imageobject> |
816 |
<textobject> <phrase>Move Layer to Top</phrase> </textobject> |
817 |
</inlinemediaobject> raises the selected layer to the top of the map. |
818 |
</para> |
819 |
</listitem> |
820 |
<listitem> |
821 |
|
822 |
<para> |
823 |
The Move Layer Up tool |
824 |
<inlinemediaobject> |
825 |
<imageobject> |
826 |
<imagedata fileref="../images/3_5_moveup.png" format="PNG" scale="&imgscale;"/> |
827 |
</imageobject> |
828 |
<imageobject> |
829 |
<imagedata fileref="./images/3_5_moveup.eps" format="EPS" scale="&imgscale;"/> |
830 |
</imageobject> |
831 |
<textobject> <phrase>Move Layer Up</phrase> </textobject> |
832 |
</inlinemediaobject> raises the selected layer one level. |
833 |
</para> |
834 |
</listitem> |
835 |
<listitem> |
836 |
|
837 |
<para> |
838 |
The Move Layer Down tool |
839 |
<inlinemediaobject> |
840 |
<imageobject> |
841 |
<imagedata fileref="../images/3_5_movedown.png" format="PNG" scale="&imgscale;"/> |
842 |
</imageobject> |
843 |
<imageobject> |
844 |
<imagedata fileref="./images/3_5_movedown.eps" format="EPS" scale="&imgscale;"/> |
845 |
</imageobject> |
846 |
<textobject> <phrase>Move Layer Down</phrase> </textobject> |
847 |
</inlinemediaobject> lowers the selected layer one level. |
848 |
</para> |
849 |
|
850 |
</listitem> |
851 |
<listitem> |
852 |
<para> |
853 |
The Move Layer to Bottom tool |
854 |
<inlinemediaobject> |
855 |
<imageobject> |
856 |
<imagedata fileref="../images/3_5_tobottom.png" format="PNG" scale="&imgscale;"/> |
857 |
</imageobject> |
858 |
<imageobject> |
859 |
<imagedata fileref="./images/3_5_tobottom.eps" format="EPS" scale="&imgscale;"/> |
860 |
</imageobject> |
861 |
<textobject> <phrase>Move Layer to Bottom</phrase> </textobject> |
862 |
</inlinemediaobject> lowers the selected layer to the bottom of the map. |
863 |
</para> |
864 |
|
865 |
</listitem> |
866 |
<listitem> |
867 |
<para> |
868 |
The Visible tool |
869 |
<inlinemediaobject> |
870 |
<imageobject> |
871 |
<imagedata fileref="../images/3_5_visible.png" format="PNG" scale="&imgscale;"/> |
872 |
</imageobject> |
873 |
<imageobject> |
874 |
<imagedata fileref="./images/3_5_visible.eps" format="EPS" scale="&imgscale;"/> |
875 |
</imageobject> |
876 |
<textobject> <phrase>Visible</phrase> </textobject> |
877 |
</inlinemediaobject> shows the selected layer in the map if it was |
878 |
hidden. |
879 |
</para> |
880 |
|
881 |
</listitem> |
882 |
<listitem> |
883 |
<para> |
884 |
The Invisible tool |
885 |
<inlinemediaobject> |
886 |
<imageobject> |
887 |
<imagedata fileref="../images/3_5_invisible.png" format="PNG" scale="&imgscale;"/> |
888 |
</imageobject> |
889 |
<imageobject> |
890 |
<imagedata fileref="./images/3_5_invisible.eps" format="EPS" scale="&imgscale;"/> |
891 |
</imageobject> |
892 |
<textobject> <phrase>Invisible</phrase> </textobject> |
893 |
</inlinemediaobject> hides the selected layer in the map. |
894 |
</para> |
895 |
|
896 |
</listitem> |
897 |
<listitem> |
898 |
<para> |
899 |
The Properties tool |
900 |
<inlinemediaobject> |
901 |
<imageobject> |
902 |
<imagedata fileref="../images/3_5_props.png" format="PNG" scale="&imgscale;"/> |
903 |
</imageobject> |
904 |
<imageobject> |
905 |
<imagedata fileref="./images/3_5_props.eps" format="EPS" scale="&imgscale;"/> |
906 |
</imageobject> |
907 |
<textobject> <phrase>Properties</phrase> </textobject> |
908 |
</inlinemediaobject> opens the layer's properties dialog box. |
909 |
Double-clicking on a layer or a group of a layer will open the |
910 |
properties dialog for that layer. |
911 |
</para> |
912 |
</listitem> |
913 |
</itemizedlist> |
914 |
|
915 |
<para> |
916 |
The most used layer related actions are also available from a |
917 |
popup menu. It is raised when a layer is clicked with the right mouse |
918 |
button. |
919 |
</para> |
920 |
|
921 |
<para> |
922 |
<figure> |
923 |
<title>Layer Popup Menu</title> |
924 |
<mediaobject> |
925 |
<imageobject><imagedata fileref="../images/3_5_popup_menu.png" format="PNG" scale="&imgscale;"/></imageobject> |
926 |
<imageobject><imagedata fileref="./images/3_5_popup_menu.eps" format="EPS" scale="&imgscale;"/></imageobject> |
927 |
</mediaobject> |
928 |
</figure> |
929 |
</para> |
930 |
|
931 |
<para> |
932 |
Along the bottom of the legend is the scalebar. The scalebar |
933 |
will be available if there are any layers and the map has a |
934 |
projection set. |
935 |
</para> |
936 |
</section> |
937 |
|
938 |
<section><title>Exporting</title> |
939 |
<para> |
940 |
Under Windows, maps can be exported in Enhanced Metafile format |
941 |
(<varname>.wmf</varname>) |
942 |
from |
943 |
<menuchoice> |
944 |
<guimenu>Map</guimenu> |
945 |
<guimenuitem>Export</guimenuitem> |
946 |
</menuchoice> for use in reports, presentations, or further |
947 |
modification. The current map view, legend, and, if available, |
948 |
scalebar are exported. Under other platforms this option is not |
949 |
available. Clicking this menu item open a file selection dialog |
950 |
that lets the user select a location to export the map. |
951 |
</para> |
952 |
</section> |
953 |
|
954 |
<section><title>Printing</title> |
955 |
<para> |
956 |
The map can be printed using |
957 |
<menuchoice> |
958 |
<guimenu>Map</guimenu> |
959 |
<guimenuitem>Print</guimenuitem> |
960 |
</menuchoice>. The current map view, legend, and, if available, |
961 |
scalebar are printed. A standard printing dialog will open allowing |
962 |
the user to configure the printer. This dialog will differ depending |
963 |
on which platform Thuban is running. |
964 |
</para> |
965 |
</section> |
966 |
|
967 |
</chapter> |
968 |
|
969 |
<chapter><title>Layer Management</title> |
970 |
<para> |
971 |
</para> |
972 |
|
973 |
<section><title>Types of Layers</title> |
974 |
<para> |
975 |
There are three types of layers supported by Thuban: shape layers, |
976 |
database layers and |
977 |
image layers. Shape layers consist of vector based shapes with |
978 |
geo-referenced coordinates. There are three types of supported |
979 |
shapes: polygons, lines (arc), and points. Database layers are similar |
980 |
to shape layers but loaded from a database instead of the file system. |
981 |
Image layers can be any image |
982 |
file format supported by the Geo-spatial Data Abstraction Library |
983 |
(GDAL). The images must have geographic |
984 |
coordinate data either embedded within the file or in a separate |
985 |
file that is in the same directory as the image file. GeoTIFF files |
986 |
work very well with Thuban and were designed specifically to be image |
987 |
layers in GIS programs. |
988 |
</para> |
989 |
<para> |
990 |
All actions in the |
991 |
<menuchoice> |
992 |
<guimenu>Layer</guimenu> |
993 |
</menuchoice> menu act on the currently selected layer in the legend. |
994 |
</para> |
995 |
</section> |
996 |
|
997 |
<section><title>Properties</title> |
998 |
<para> |
999 |
To view the properties for a layer it must first be selected in the |
1000 |
legend. The menu option |
1001 |
<menuchoice> |
1002 |
<guimenu>Layer</guimenu> |
1003 |
<guimenuitem>Properties</guimenuitem> |
1004 |
</menuchoice> opens a dialog that displays a layer's properties. |
1005 |
All layers have a title which can be modified in the text field |
1006 |
provided. The type of layer is also shows. If the type is a type |
1007 |
of shape (polygon, arc, point) the classification table will be |
1008 |
shown. Image layers have no other properties other than title |
1009 |
and type. |
1010 |
</para> |
1011 |
<para> |
1012 |
<figure> |
1013 |
<title>Properties Window</title> |
1014 |
<mediaobject> |
1015 |
<imageobject><imagedata fileref="../images/4_2_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject> |
1016 |
<imageobject><imagedata fileref="./images/4_2_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1017 |
</mediaobject> |
1018 |
</figure> |
1019 |
</para> |
1020 |
<para> |
1021 |
<figure> |
1022 |
<title>Properties Window</title> |
1023 |
<mediaobject> |
1024 |
<imageobject><imagedata fileref="../images/4_2_raster_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject> |
1025 |
<imageobject><imagedata fileref="./images/4_2_raster_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1026 |
</mediaobject> |
1027 |
</figure> |
1028 |
</para> |
1029 |
</section> |
1030 |
|
1031 |
<section><title>Visibility</title> |
1032 |
<para> |
1033 |
Sometimes it is not desirable to view all layers at the same time. |
1034 |
Some layers may take a long time to draw and so while navigating |
1035 |
around the map the user may not want to wait for the map to redraw |
1036 |
all the layers each time the map is changed. Each layer can be |
1037 |
independently turned on or off using the |
1038 |
<menuchoice> |
1039 |
<guimenu>Layer</guimenu> |
1040 |
<guimenuitem>Show</guimenuitem> |
1041 |
</menuchoice> |
1042 |
or |
1043 |
<menuchoice> |
1044 |
<guimenu>Layer</guimenu> |
1045 |
<guimenuitem>Hide</guimenuitem> |
1046 |
</menuchoice> options respectively. |
1047 |
</para> |
1048 |
</section> |
1049 |
|
1050 |
<section><title>Duplication</title> |
1051 |
<para> |
1052 |
Layers and all their properties, including classifications, can |
1053 |
be duplicated using |
1054 |
<menuchoice> |
1055 |
<guimenu>Layer</guimenu> |
1056 |
<guimenuitem>Duplicate</guimenuitem> |
1057 |
</menuchoice>. Duplicating a layer is useful if the user wishes |
1058 |
to model a layer in several different ways. Even though the layers |
1059 |
overlap, by carefully selecting the shape properties it is possible |
1060 |
to display several pieces of information at once. For example, one |
1061 |
copy of a roads layer may be classified on a length property and |
1062 |
another copy may be classified on a type property. If the length |
1063 |
property was expressed with color and the type property expressed |
1064 |
with line thickness then it would be possible to view both |
1065 |
classifications by placing the type property copy over the |
1066 |
length property copy. |
1067 |
</para> |
1068 |
</section> |
1069 |
|
1070 |
</chapter> |
1071 |
|
1072 |
<chapter><title>Layer Classifications</title> |
1073 |
<para> |
1074 |
A layer classification is a way of assigning drawing properties to |
1075 |
groups of shapes based on attributes stored in the layer's table. |
1076 |
Only layer's with shapes can have a classification; image layers |
1077 |
cannot be classified. |
1078 |
</para> |
1079 |
<para> |
1080 |
A classification consists of a number of groups, each group |
1081 |
having a value or range of values to match against, and symbol |
1082 |
properties which control how a shape is drawn on the map. The user |
1083 |
selects which field in the table is used by the classification and |
1084 |
when the map is drawn the value for that field for each shape is |
1085 |
compared with each group's value. The properties of the first group |
1086 |
to match are used to draw the shape. This allows the user to get a |
1087 |
visual impression of not only how the data is laid out but also what |
1088 |
kind of data lies where. |
1089 |
</para> |
1090 |
<para> |
1091 |
A layer always has a classification. When a new layer is added to the |
1092 |
map, a default classification is created with the DEFAULT group. This |
1093 |
group cannot be removed but can be hidden (see below). Every shape in the |
1094 |
layer, regardless of its attributes, will match this group if no other |
1095 |
group matches. |
1096 |
</para> |
1097 |
|
1098 |
<section><title>Editing Classifications</title> |
1099 |
<para> |
1100 |
A layer's classification can be modified under the properties dialog |
1101 |
(<menuchoice> |
1102 |
<guimenu>Layer</guimenu> |
1103 |
<guimenuitem>Properties</guimenuitem> |
1104 |
</menuchoice>). The layer's classification field can be set to None, |
1105 |
which simply assigns a DEFAULT group to the classification. No new |
1106 |
groups can be added to the classification if the field is None. |
1107 |
The user must first select a field to classify on. New groups can |
1108 |
be added to the classification with the <guibutton>Add</guibutton> |
1109 |
button. |
1110 |
</para> |
1111 |
<para> |
1112 |
To apply the changes to the map the user can click |
1113 |
either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>. |
1114 |
<guibutton>Try</guibutton> will not close the dialog box, allowing |
1115 |
the user to see how the classification changes the map. |
1116 |
<guibutton>Revert</guibutton> will undo the last classification applied |
1117 |
to the map. <guibutton>OK</guibutton> will commit the changes and |
1118 |
close the dialog. The user will be unable to undo the changes. |
1119 |
<guibutton>Close</guibutton> simply closes the dialog box. If any |
1120 |
changes have not been applied with <guibutton>Try</guibutton> the |
1121 |
changes will not be applied to the map. |
1122 |
</para> |
1123 |
<para> |
1124 |
<figure> |
1125 |
<title>Properties Window</title> |
1126 |
<mediaobject> |
1127 |
<imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject> |
1128 |
<imageobject><imagedata fileref="./images/5_classification.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1129 |
</mediaobject> |
1130 |
</figure> |
1131 |
</para> |
1132 |
<para> |
1133 |
The order of the groups in the classification is significant |
1134 |
except for the DEFAULT group, which remains at the top. When shapes |
1135 |
are matched against groups the matching begins at the first group |
1136 |
after the DEFAULT group so that groups higher in the list will |
1137 |
be checked first. Matching for a |
1138 |
given shape will stop at the first group that matches. The user can |
1139 |
use <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton> |
1140 |
to change the order of the groups. The DEFAULT group will always |
1141 |
match a shape that hasn't matched another group. |
1142 |
</para> |
1143 |
<section><title>Visible</title> |
1144 |
<para> |
1145 |
The Visible column has check-boxes that determine whether a |
1146 |
classification group will be displayed in the legend. This is |
1147 |
useful if the user knows that the groups completely cover |
1148 |
the data set and don't want the DEFAULT group to be displayed |
1149 |
in the legend and on a printout. |
1150 |
</para> |
1151 |
</section> |
1152 |
<section><title>Symbols</title> |
1153 |
<para> |
1154 |
Each type of shape has its own type of symbol. Thuban supports three |
1155 |
types of shapes: polygons, lines, and points. Polygons and points |
1156 |
have outline and fill color, while lines have only line color. Each |
1157 |
group has associated symbol properties. To edit the symbol |
1158 |
properties for a group the user can double click on the Symbol |
1159 |
column or select a group and click the |
1160 |
<guibutton>Edit Symbol</guibutton> button. |
1161 |
</para> |
1162 |
</section> |
1163 |
<section><title>Value</title> |
1164 |
<para> |
1165 |
The Value column of the classification table is the value that will |
1166 |
be matched when the map is being drawn. The type of data that can |
1167 |
entered into this field depends on the type of data of the |
1168 |
classification field. |
1169 |
</para> |
1170 |
<para> |
1171 |
If the field is of type Text, anything entered |
1172 |
into the field is valid. The text will be compared literally to the |
1173 |
value of the shape attribute, including case sensitivity. |
1174 |
If the type is Integer, then any valid integer may be entered. In |
1175 |
addition, with special syntax, a range of values can be entered. |
1176 |
A range from <varname>start</varname> to <varname>end</varname> |
1177 |
inclusive is specified like this: <literal>[start;end]</literal>. |
1178 |
The exclusive range is specified like this: |
1179 |
<literal>]start;end[</literal>. Ranges can include infinity like |
1180 |
this: <literal>[-oo;oo]</literal>. Field types can also be of type |
1181 |
Decimal. They represent any rational number and can be used in |
1182 |
ranges as well. |
1183 |
</para> |
1184 |
</section> |
1185 |
<section><title>Label</title> |
1186 |
<para> |
1187 |
By default, the text that is displayed for a group in the legend |
1188 |
is the value for that group. The label can substitute a more |
1189 |
descriptive term in the legend. |
1190 |
</para> |
1191 |
</section> |
1192 |
</section> |
1193 |
|
1194 |
<section><title>Generating Classes</title> |
1195 |
<para> |
1196 |
<figure> |
1197 |
<title>Generate Class</title> |
1198 |
<mediaobject> |
1199 |
<imageobject><imagedata fileref="../images/5_3_genclass.png" format="PNG" scale="&imgscale;"/></imageobject> |
1200 |
<imageobject><imagedata fileref="./images/5_3_genclass.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1201 |
</mediaobject> |
1202 |
</figure> |
1203 |
</para> |
1204 |
<para> |
1205 |
Creating a classification by hand can be tedious. |
1206 |
Thuban, therefore, provides a means of generating an entire |
1207 |
classification at once while still giving the user control over |
1208 |
how it appears. Clicking <guibutton>Generate Class</guibutton> |
1209 |
opens the <varname>Generate Classification</varname> dialog. |
1210 |
Under the <varname>Generate</varname> pull down there are at most |
1211 |
three different ways to generate classifications: |
1212 |
Unique Values, Uniform Distribution, and Quantiles. Some options |
1213 |
may not be available if the data type for the field does not |
1214 |
support them. For instance, <varname>Uniform Distribution</varname> |
1215 |
doesn't make sense for a Text field. |
1216 |
</para> |
1217 |
<para> |
1218 |
For every way of generating a classification, a color scheme must |
1219 |
be selected. Thuban provides several different color schemes that |
1220 |
affect how the group properties change over the classification. |
1221 |
It may be desirable that only certain properties change over the |
1222 |
classification. If the shape type is a polygon or a point then |
1223 |
the <guibutton>Fix Border Color</guibutton> option will be available. |
1224 |
This allows the user to select a border color for all classification |
1225 |
groups. |
1226 |
It is also possible to create a custom color scheme. Selecting |
1227 |
this option will display two symbols: the one of the left has the |
1228 |
properties of the first group and the one on the right has the |
1229 |
properties of the last group. Thuban will interpolate between these |
1230 |
two properties to generate the other groups. |
1231 |
<figure> |
1232 |
<title>Custom Color Scheme</title> |
1233 |
<mediaobject> |
1234 |
<imageobject><imagedata fileref="../images/5_2_custom_ramp.png" format="PNG" scale="&imgscale;"/></imageobject> |
1235 |
<imageobject><imagedata fileref="./images/5_2_custom_ramp.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1236 |
</mediaobject> |
1237 |
</figure> |
1238 |
</para> |
1239 |
<para> |
1240 |
The Unique Values option lets the user select specific values that |
1241 |
appear in the table. Clicking <guibutton>Retrieve From Table</guibutton> |
1242 |
searches the table for all unique values and displays them in the |
1243 |
list on the left. Items can be selected and moved to the list on the |
1244 |
right. Each list can be sorted or reversed for easier searching. |
1245 |
The classification that is generated will be in the same order as |
1246 |
the list on the right. |
1247 |
<figure> |
1248 |
<title>Unique Values</title> |
1249 |
<mediaobject> |
1250 |
<imageobject><imagedata fileref="../images/5_2_unique_values.png" format="PNG" scale="&imgscale;"/></imageobject> |
1251 |
<imageobject><imagedata fileref="./images/5_2_unique_values.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1252 |
</mediaobject> |
1253 |
</figure> |
1254 |
</para> |
1255 |
<para> |
1256 |
The Uniform Distribution option creates a user specified number of |
1257 |
groups of ranges such that each range covers equal intervals. The |
1258 |
minimum and maximum values can automatically be retrieved from the |
1259 |
table by clicking <guibutton>Retrieve From Table</guibutton>. The |
1260 |
stepping is how large each interval is. Adjusting this value will |
1261 |
automatically recalculate how many groups is appropriate. |
1262 |
<figure> |
1263 |
<title>Uniform Distribution</title> |
1264 |
<mediaobject> |
1265 |
<imageobject><imagedata fileref="../images/5_2_uniform_dist.png" format="PNG" scale="&imgscale;"/></imageobject> |
1266 |
<imageobject><imagedata fileref="./images/5_2_uniform_dist.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1267 |
</mediaobject> |
1268 |
</figure> |
1269 |
</para> |
1270 |
<para> |
1271 |
The Quantiles option generates ranges based on the number of items |
1272 |
in the table. For example, by specifying five groups Thuban will |
1273 |
generate five groups with appropriate ranges such that 20% of the table |
1274 |
data is in each group. If it is impossible to generate exact |
1275 |
groupings, Thuban will issue a warning but allow the user to continue. |
1276 |
<figure> |
1277 |
<title>Quantiles</title> |
1278 |
<mediaobject> |
1279 |
<imageobject><imagedata fileref="../images/5_2_quantiles.png" format="PNG" scale="&imgscale;"/></imageobject> |
1280 |
<imageobject><imagedata fileref="./images/5_2_quantiles.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1281 |
</mediaobject> |
1282 |
</figure> |
1283 |
</para> |
1284 |
</section> |
1285 |
</chapter> |
1286 |
|
1287 |
<chapter><title>Projection Management</title> |
1288 |
<para> |
1289 |
Projections control how the geographic data is displayed on the screen. |
1290 |
If multiple layers are loaded into Thuban where the geographic data |
1291 |
is in a different projection system, then the user must specify a |
1292 |
projection for each layer. The user must also tell Thuban which |
1293 |
projection the map is in. This can be the same as the layers or a different |
1294 |
projection in which case the layers are reprojected into that space. |
1295 |
The map projection can be set using |
1296 |
<menuchoice> |
1297 |
<guimenu>Map</guimenu> |
1298 |
<guimenuitem>Projection</guimenuitem> |
1299 |
</menuchoice> and the layer projection can be set using |
1300 |
<menuchoice> |
1301 |
<guimenu>Layer</guimenu> |
1302 |
<guimenuitem>Projection</guimenuitem> |
1303 |
</menuchoice>. |
1304 |
<figure> |
1305 |
<title>Projection Window</title> |
1306 |
<mediaobject> |
1307 |
<imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject> |
1308 |
<imageobject><imagedata fileref="./images/6_projection.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1309 |
</mediaobject> |
1310 |
</figure> |
1311 |
</para> |
1312 |
<para> |
1313 |
Thuban is distributed with a sample collection of projections and the |
1314 |
set of coordinate systems as used by the EPSG |
1315 |
(European Petroleum Survey Group). This quite large set is only displayed |
1316 |
if activated by the according checkbox. The set falls into two parts: |
1317 |
deprecated lists all projections which are no longer part of the |
1318 |
EPSG data base. |
1319 |
</para> |
1320 |
<para> |
1321 |
The |
1322 |
user can create new projections and make them available to all |
1323 |
future Thuban sessions. They may also be exported and imported so |
1324 |
that custom projections can be distributed. |
1325 |
</para> |
1326 |
<section><title>Selecting a Projection</title> |
1327 |
<para> |
1328 |
The available projections are listed on the left. If the layer |
1329 |
or map already has a projection it will initially be highlighted |
1330 |
and will end with <varname>(current)</varname>. Selecting |
1331 |
<varname><None></varname> will cause Thuban to use the data as |
1332 |
it appears in the source file and will not use a projection. |
1333 |
</para> |
1334 |
</section> |
1335 |
<section><title>Editing a Projection</title> |
1336 |
<para> |
1337 |
Whenever a projection is selected from the list its properties |
1338 |
are displayed on the right. These properties can be changed |
1339 |
and the changes saved to the selected projection using |
1340 |
<guibutton>Update</guibutton>. Only a projection that comes |
1341 |
from a file can be updated, so if the current layer's projection |
1342 |
is selected, <guibutton>Update</guibutton> will be disabled. |
1343 |
<guibutton>Add to List</guibutton> adds the projection to the |
1344 |
list of available projections as a new entry, and thus makes it |
1345 |
available to future Thuban sessions. Clicking <guibutton>New</guibutton> |
1346 |
will create an entirely new, empty projection. The |
1347 |
<guibutton>Remove</guibutton> button will permanently remove a |
1348 |
projection from the list of available projections. |
1349 |
</para> |
1350 |
<para> |
1351 |
To apply the selected projection to the map the user can click |
1352 |
either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>. |
1353 |
<guibutton>Try</guibutton> will not close the dialog box, allowing |
1354 |
the user to see how the projeciton changes the map. |
1355 |
<guibutton>Revert</guibutton> will undo the last projection applied |
1356 |
to the map. <guibutton>OK</guibutton> will commit the changes and |
1357 |
close the dialog. The user will be unable to undo the changes. |
1358 |
<guibutton>Close</guibutton> simply closes the dialog box. If no |
1359 |
selection has been applied with <guibutton>Try</guibutton> the |
1360 |
selection will not be applied to the map. |
1361 |
</para> |
1362 |
</section> |
1363 |
<section><title>Importing/Exporting Projections</title> |
1364 |
<para> |
1365 |
The projections that appear in the list of available projections |
1366 |
can be exported to another file that the user chooses. By selecting |
1367 |
one or more projections and clicking <guibutton>Export</guibutton> |
1368 |
the user will be able to select a file in which to store those |
1369 |
projections. |
1370 |
The file can then be distributed to other Thuban users. To import |
1371 |
a projection file the user can click <guibutton>Import</guibutton>. |
1372 |
The imported projections are added to the list and are then available |
1373 |
to the current session and any future Thuban sessions. |
1374 |
</para> |
1375 |
</section> |
1376 |
</chapter> |
1377 |
|
1378 |
<chapter><title>Table Management</title> |
1379 |
<para> |
1380 |
Thuban distinguishes two different types of tables: Attribute tables |
1381 |
(which belong to a layer) and normal data tables. Both provide |
1382 |
the same general functionality with the difference that actions on an |
1383 |
attribute table might also effect the map display. |
1384 |
</para> |
1385 |
|
1386 |
<section><title>Table View</title> |
1387 |
<para> |
1388 |
<figure> |
1389 |
<title>Table View</title> |
1390 |
<mediaobject> |
1391 |
<imageobject><imagedata fileref="../images/7_1_table_view.png" format="PNG" scale="&imgscale;"/></imageobject> |
1392 |
<imageobject><imagedata fileref="./images/7_1_table_view.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1393 |
</mediaobject> |
1394 |
</figure> |
1395 |
</para> |
1396 |
<para> |
1397 |
Thuban provides a standard dialog to display table contents, the |
1398 |
Table View. The view has five sections: The title, selections, |
1399 |
the table grid, export functions, and the status bar. |
1400 |
</para> |
1401 |
<para> |
1402 |
The title bar identifies the table with its name. |
1403 |
</para> |
1404 |
<para> |
1405 |
The selections box let the user perform simple analysis on the data |
1406 |
based on comparisons: The first choice must be a field identifier of |
1407 |
the table, the second choice determines the type of comparison. The |
1408 |
third choice can be either a specific value (interpreted as numerical |
1409 |
or string depending on the type of the first field) or a second field |
1410 |
identifier. Thus you can perform analysis like selecting all |
1411 |
records where <literal>population > 10000</literal> or |
1412 |
<literal>cars_per_inhabitant < bikes_per_inhabitant</literal> |
1413 |
(note that the field names are only explanatory, the dBase files |
1414 |
allow only 11 character field names). |
1415 |
|
1416 |
Selections can be combined either by applying a selection only on |
1417 |
a previously selected set of records or by adding the results of a |
1418 |
selection to a previous set. The default is that a selection replaces |
1419 |
earlier results. |
1420 |
</para> |
1421 |
<para> |
1422 |
The table grid shows the contents of the table (one record per row), |
1423 |
with highlighted selection results. Columns and rows can be resized. |
1424 |
</para> |
1425 |
<para> |
1426 |
The contents of a table can be exported into a file, either dBase |
1427 |
format (DBF) or comma separated values (CSV). The |
1428 |
<guibutton>Export</guibutton> button |
1429 |
raises a file dialog to specify a path and file name, the export type |
1430 |
is determined by the file extension (either .dbf or .csv). |
1431 |
|
1432 |
The <guibutton>Export Selection</guibutton> button works similarly |
1433 |
but exports only the selected records. |
1434 |
|
1435 |
The <guibutton>Close</guibutton> button closes the table view window. |
1436 |
This is different from the menu item |
1437 |
<menuchoice> |
1438 |
<guimenu>Table</guimenu> |
1439 |
<guimenuitem>Close</guimenuitem> |
1440 |
</menuchoice> which unloads the table from Thuban. |
1441 |
</para> |
1442 |
<para> |
1443 |
The status bar displays some statistics about the table and optional |
1444 |
selection results. |
1445 |
</para> |
1446 |
</section> |
1447 |
|
1448 |
<section><title>General Functionality (Menu Table)</title> |
1449 |
<para> |
1450 |
The general functions affect all tables open in Thuban. Attribute |
1451 |
tables are considered here as normal data tables (with the exception |
1452 |
that they cannot be closed). |
1453 |
</para> |
1454 |
<section><title>Open</title> |
1455 |
<para> |
1456 |
The |
1457 |
<menuchoice> |
1458 |
<guimenu>Table</guimenu> |
1459 |
<guimenuitem>Open</guimenuitem> |
1460 |
</menuchoice> |
1461 |
item raises a file dialog to let you select a |
1462 |
dBase file from the file system to be loaded into Thuban read-only. |
1463 |
On <guibutton>OK</guibutton> the selected file is loaded and a |
1464 |
table view is opened. |
1465 |
</para> |
1466 |
</section> |
1467 |
|
1468 |
<section><title>Close</title> |
1469 |
<para> |
1470 |
The |
1471 |
<menuchoice> |
1472 |
<guimenu>Table</guimenu> |
1473 |
<guimenuitem>Close</guimenuitem> |
1474 |
</menuchoice> |
1475 |
item raises a dialog listing the currently open |
1476 |
data tables |
1477 |
(loaded via |
1478 |
<menuchoice> |
1479 |
<guimenu>Table</guimenu> |
1480 |
<guimenuitem>Open</guimenuitem> |
1481 |
</menuchoice>). Selected tables are dereferenced on confirmation. |
1482 |
Since tables are opened read-only the contents of the tables are |
1483 |
not affected. |
1484 |
|
1485 |
Any open views of the tables are closed as well. |
1486 |
|
1487 |
Tables used in a join cannot be closed. |
1488 |
</para> |
1489 |
</section> |
1490 |
|
1491 |
<section><title>Rename</title> |
1492 |
<para> |
1493 |
<menuchoice> |
1494 |
<guimenu>Table</guimenu> |
1495 |
<guimenuitem>Rename</guimenuitem> |
1496 |
</menuchoice> changes the table title. |
1497 |
</para> |
1498 |
</section> |
1499 |
|
1500 |
<section><title>Show</title> |
1501 |
<para> |
1502 |
The |
1503 |
<menuchoice> |
1504 |
<guimenu>Table</guimenu> |
1505 |
<guimenuitem>Show</guimenuitem> |
1506 |
</menuchoice> |
1507 |
item raises a list of available tables (explicitly |
1508 |
loaded, attribute tables, results of a join). Selected tables are |
1509 |
show in tables views on <guibutton>OK</guibutton>. |
1510 |
</para> |
1511 |
</section> |
1512 |
|
1513 |
<section><title>Join</title> |
1514 |
<para> |
1515 |
<figure> |
1516 |
<title>Join Tables</title> |
1517 |
<mediaobject> |
1518 |
<imageobject><imagedata fileref="../images/7_2_5_join.png" format="PNG" scale="&imgscale;"/></imageobject> |
1519 |
<imageobject><imagedata fileref="./images/7_2_5_join.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1520 |
</mediaobject> |
1521 |
</figure> |
1522 |
</para> |
1523 |
<para> |
1524 |
The |
1525 |
<menuchoice> |
1526 |
<guimenu>Table</guimenu> |
1527 |
<guimenuitem>Join</guimenuitem> |
1528 |
</menuchoice> |
1529 |
item raises a dialog to specify the two tables to be |
1530 |
joined. The join results in a new table named 'Join of "left table" |
1531 |
and "right table"'. |
1532 |
|
1533 |
The dialog lets you select the two tables to be joined and the two |
1534 |
fields the join has to be performed on. By default, the new |
1535 |
table contains only those records which are matched by the join. |
1536 |
|
1537 |
If you want to preserve the records of the left table you can |
1538 |
perform an outer join. The fields from the right table for records |
1539 |
not matched by the join are filled with <varname>None</varname> in |
1540 |
this case. |
1541 |
</para> |
1542 |
</section> |
1543 |
|
1544 |
</section> |
1545 |
<section><title>Attribute Tables</title> |
1546 |
<para> |
1547 |
To clearly separate between both types of tables (data and |
1548 |
attribute), Thuban provides functionality regarding the attribute |
1549 |
tables under the <menuchoice><guimenu>Layer</guimenu></menuchoice> menu. |
1550 |
</para> |
1551 |
|
1552 |
<section><title>Show Table</title> |
1553 |
<para> |
1554 |
<menuchoice> |
1555 |
<guimenu>Layer</guimenu> |
1556 |
<guimenuitem>Show Table</guimenuitem> |
1557 |
</menuchoice> |
1558 |
opens the attribute table of the currently active layer in a table |
1559 |
view. |
1560 |
|
1561 |
In addition to the functionality described above selections |
1562 |
affect also the map display: objects related to selected records |
1563 |
are highlighted. |
1564 |
</para> |
1565 |
</section> |
1566 |
|
1567 |
<section><title>Join Table</title> |
1568 |
<para> |
1569 |
Unlike the join described above, the join does not result in a |
1570 |
new table. The attribute table of the currently active layer is the |
1571 |
left table and other tables are joined to this table. The results of |
1572 |
the join are available for classification. |
1573 |
|
1574 |
As a consequence, the join cannot result in fewer |
1575 |
records than the source attribute table. The user is warned if the |
1576 |
right table does not fulfill this constraint. An outer join must be |
1577 |
used in such cases. |
1578 |
</para> |
1579 |
</section> |
1580 |
|
1581 |
<section><title>Unjoin Table</title> |
1582 |
<para> |
1583 |
As said above, a normal table cannot be closed while it is still |
1584 |
used in a join. While the joined table resulting from a join of |
1585 |
normal tables can be simply closed (and thereby dereferencing |
1586 |
the source tables), this is not possible for attribute tables. |
1587 |
|
1588 |
Hence joins on attribute tables must be solved explicitly. This is |
1589 |
what the |
1590 |
<menuchoice> |
1591 |
<guimenu>Layer</guimenu> |
1592 |
<guimenuitem>Unjoin Table</guimenuitem> |
1593 |
</menuchoice> |
1594 |
item is used for: The last join for the currently |
1595 |
active layer is solved. |
1596 |
</para> |
1597 |
</section> |
1598 |
</section> |
1599 |
</chapter> |
1600 |
|
1601 |
<chapter><title>Extensions</title> |
1602 |
<para> |
1603 |
Thuban is designed to be extensible. The term Extension is used as a |
1604 |
general term for anything that extends Thuban. |
1605 |
This chapter introduces into some oppportunities how to add and |
1606 |
handle extra functionality developed by your own or third parties. |
1607 |
</para> |
1608 |
|
1609 |
<section><title>Add personal extensions via thubanstart.py</title> |
1610 |
<para> |
1611 |
After Thuban has been started for the first time, a directory |
1612 |
.thuban is created within your home directory. |
1613 |
There you can add a file thubanstart.py which will be imported |
1614 |
by Thuban at start-up. It is recommended to add only import-statements |
1615 |
to this file to keep the actual code of extensions separate. |
1616 |
</para> |
1617 |
<para> |
1618 |
The modules to import must either be found through the environment |
1619 |
variable PYTHONPATH or directly be placed into the .thuban-directory. |
1620 |
</para> |
1621 |
<para> |
1622 |
As an example, copy the file examples/simple_extensions/hello_world.py |
1623 |
of the Thuban source code into the .thuban-directory of your home |
1624 |
directory. Now add add the statement import hello_world to the |
1625 |
file thubanstart.py and run Thuban. You will notice an additional |
1626 |
menu <menuchoice><guimenu>Extensions</guimenu></menuchoice> where |
1627 |
the new item for the Hello-World extension is placed - select it |
1628 |
to see the Hello-World message. |
1629 |
</para> |
1630 |
</section> |
1631 |
|
1632 |
<section><title>Extensions included in Thuban package</title> |
1633 |
<para> |
1634 |
The extensions described in this section are part of the |
1635 |
Thuban package, but not activated by default. |
1636 |
You will find them in the Thuban installation directory |
1637 |
under <literal>Extensions/</literal>. Activate them as personal |
1638 |
extensions via PYTHONPATH as described in the previous section. |
1639 |
Stable extensions will appear under the menu |
1640 |
<menuchoice><guimenu>Extensions</guimenu></menuchoice> and |
1641 |
extensions which are in experimental state and therefore |
1642 |
not fully functional under |
1643 |
<menuchoice><guimenu>Experimental</guimenu></menuchoice>. |
1644 |
</para> |
1645 |
|
1646 |
<section><title>Stable extensions</title> |
1647 |
<para> |
1648 |
These extensions provide extra-functionality to Thuban |
1649 |
that has not (yet) been integrated in the main application. |
1650 |
They are considered to be free of bugs, but may be |
1651 |
further polished with helpful user interactions. |
1652 |
</para> |
1653 |
<section><title>gns2shp</title> |
1654 |
<para> |
1655 |
This tool converts data of the Geospatial Names Server |
1656 |
(GNS, see <ulink url="http://www.nima.mil/gns"/>) |
1657 |
into Shapefile format. |
1658 |
The above web-site offer to download named places |
1659 |
information grouped by countries for all of the world |
1660 |
except USA for which other data are provided. |
1661 |
</para> |
1662 |
<para> |
1663 |
If you download and unpack a package, you will have |
1664 |
a text-file with suffix .txt. |
1665 |
Selecting such a file via gns2shp will create the |
1666 |
corresponding Shapefile with the same basename and |
1667 |
place it in the same direcory. Afterwards it |
1668 |
is automatically loaded into Thuban. |
1669 |
The Shapefile will not automatically be delete afterwards. |
1670 |
</para> |
1671 |
<para> |
1672 |
The gns2shp.py module can also be executed on the |
1673 |
command line for batch processing purposes. |
1674 |
</para> |
1675 |
<para> |
1676 |
A sample (<literal>ls.txt</literal> for Liechtenstein) |
1677 |
is included in the directory |
1678 |
<literal>Extensions/gns2shp/test</literal>. |
1679 |
</para> |
1680 |
</section> |
1681 |
</section> |
1682 |
<section><title>Experimental extensions</title> |
1683 |
<para> |
1684 |
All all of these functions have to be handled with care, |
1685 |
since they are neither complete nor well tested. |
1686 |
They are to be seen as a proof-of-concept and may |
1687 |
additionally in some cases of practical help. |
1688 |
</para> |
1689 |
<para> |
1690 |
Any interest on further improvement of these extensions |
1691 |
should be communicated towards the developer and user |
1692 |
community. |
1693 |
</para> |
1694 |
|
1695 |
<section><title>importAPR</title> |
1696 |
<para> |
1697 |
This command offer to load an ESRI® ArcView® project |
1698 |
file (suffix .apr) and convert it for use within Thuban. |
1699 |
After selecting a apr-file to load, a list |
1700 |
will be presented that offers to select one of the views |
1701 |
of the apr-file, provided there is more than one. |
1702 |
Furthermore, the Session Info-Tree is extended with |
1703 |
a complete representation of the parsed apr-file. |
1704 |
</para> |
1705 |
<para> |
1706 |
The legend of Thuban does not yet cover all of the elements as |
1707 |
supported by the legend of ArcView®. Therefore, the Thuban |
1708 |
map will look different. Furthermore, the apr-format is |
1709 |
a proprietary format, not openly documented. |
1710 |
Therefore, the interpretation is |
1711 |
partly based on reverse engeneering and good guessing. |
1712 |
</para> |
1713 |
<para> |
1714 |
The file-paths within the apr-file may not fit and potentially |
1715 |
are subject to fix in the apr-file. You can do this |
1716 |
applying any text editor. The paths are either absolute |
1717 |
or relative from where Thuban has been started. |
1718 |
</para> |
1719 |
<para> |
1720 |
A sample for the Iceland data is included as |
1721 |
<literal>Extensions/importAPR/samples/iceland.apr</literal>. |
1722 |
The file-paths are relative from the Thuban main directory. |
1723 |
</para> |
1724 |
</section> |
1725 |
</section> |
1726 |
</section> |
1727 |
|
1728 |
<section><title>Writing simple extensions</title> |
1729 |
<para> |
1730 |
Writing an extension for Thuban basically means to |
1731 |
implement the extra functionality in Python with all of the |
1732 |
Thuban classes, methods and variables available. |
1733 |
</para> |
1734 |
<para> |
1735 |
All classes and their methods are documented in the source code |
1736 |
(see their doc-strings). Here is an example from |
1737 |
Thuban/Model/layer.py that describes some of the methods |
1738 |
of a Layer object: |
1739 |
</para> |
1740 |
<programlisting> |
1741 |
<![CDATA[ |
1742 |
class BaseLayer(TitledObject, Modifiable): |
1743 |
|
1744 |
"""Base class for the layers.""" |
1745 |
|
1746 |
def __init__(self, title, visible = True, projection = None): |
1747 |
"""Initialize the layer. |
1748 |
|
1749 |
title -- the title |
1750 |
visible -- boolean. If true the layer is visible. |
1751 |
""" |
1752 |
TitledObject.__init__(self, title) |
1753 |
Modifiable.__init__(self) |
1754 |
self.visible = visible |
1755 |
self.projection = projection |
1756 |
|
1757 |
def Visible(self): |
1758 |
"""Return true if layer is visible""" |
1759 |
return self.visible |
1760 |
|
1761 |
def SetVisible(self, visible): |
1762 |
"""Set the layer's visibility.""" |
1763 |
self.visible = visible |
1764 |
self.issue(LAYER_VISIBILITY_CHANGED, self) |
1765 |
|
1766 |
def HasClassification(self): |
1767 |
"""Determine if this layer support classifications.""" |
1768 |
... |
1769 |
]]> |
1770 |
</programlisting> |
1771 |
<para> |
1772 |
This example intends to give you an impression of the |
1773 |
source-code-level documentation. |
1774 |
You have to make yourself familiar with |
1775 |
the Python programming language to understand some special |
1776 |
code elements. |
1777 |
</para> |
1778 |
<section><title>hello_world.py</title> |
1779 |
<para> |
1780 |
Traditionally, the first example should welcome the world. |
1781 |
Most of the code handles the frame for integrating a menu |
1782 |
item into Thuban while the actual raising of a message |
1783 |
is done in a single line. |
1784 |
</para> |
1785 |
<programlisting> |
1786 |
<![CDATA[ |
1787 |
# Copyright (C) 2003 by Intevation GmbH |
1788 |
# Authors: |
1789 |
# Jan-Oliver Wagner <[email protected]> |
1790 |
# |
1791 |
# This program is free software under the GPL (>=v2) |
1792 |
# Read the file COPYING coming with Thuban for details. |
1793 |
|
1794 |
""" |
1795 |
Extend Thuban with a sample Hello World to demonstrate simple |
1796 |
extensions. |
1797 |
""" |
1798 |
|
1799 |
__version__ = '$Revision$' |
1800 |
|
1801 |
# use _() already now for all strings that may later be translated |
1802 |
from Thuban import _ |
1803 |
|
1804 |
# Thuban has named commands which can be registered in the central |
1805 |
# instance registry. |
1806 |
from Thuban.UI.command import registry, Command |
1807 |
|
1808 |
# The instance of the main menu of the Thuban application |
1809 |
# See Thuban/UI/menu.py for the API of the Menu class |
1810 |
from Thuban.UI.mainwindow import main_menu |
1811 |
|
1812 |
def hello_world_dialog(context): |
1813 |
"""Just raise a simple dialog to greet the world. |
1814 |
|
1815 |
context -- The Thuban context. |
1816 |
""" |
1817 |
context.mainwindow.RunMessageBox(_('Hello World'), _('Hello World!')) |
1818 |
|
1819 |
|
1820 |
# create a new command and register it |
1821 |
registry.Add(Command('hello_world', _('Hello World'), hello_world_dialog, |
1822 |
helptext = _('Welcome everyone on this planet'))) |
1823 |
|
1824 |
# find the extensions menu (create it anew if not found) |
1825 |
extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions')) |
1826 |
|
1827 |
# finally bind the new command with an entry in the extensions menu |
1828 |
extensions_menu.InsertItem('hello_world') |
1829 |
]]> |
1830 |
</programlisting> |
1831 |
</section> |
1832 |
<section><title>Registering a Command</title> |
1833 |
<para> |
1834 |
Mainly, our new function has to be registered to the Thuban |
1835 |
framework in order to connect it to the menu. A registered |
1836 |
command can also be connected to e.g. a toolbar button. |
1837 |
</para> |
1838 |
<para> |
1839 |
The instances and classes for this are imported at the beginning. |
1840 |
Any code not inside a method or class is directly executed when |
1841 |
the source-code module is imported. Therefore, the second |
1842 |
part of this example consist of the plain statements to create a new |
1843 |
Command and to add it to the menu. |
1844 |
</para> |
1845 |
<para> |
1846 |
By convention, it looks for a menu registered as ``extensions'' to |
1847 |
insert the new command. If it does not exist yet, it gets created. |
1848 |
It is advisable to copy this code for any of your extensions. |
1849 |
</para> |
1850 |
</section> |
1851 |
<section><title>The Thuban context</title> |
1852 |
<para> |
1853 |
A registered command that is called, always receives the |
1854 |
Thuban context. This instance provides our method with |
1855 |
hook references to all important components of the Thuban |
1856 |
application. |
1857 |
</para> |
1858 |
<para> |
1859 |
In the example hello_world.py, our function uses the |
1860 |
mainwindow component which offers a method to raise a |
1861 |
message dialog. In total there are three hooks: |
1862 |
<itemizedlist> |
1863 |
<listitem> |
1864 |
<para>application: |
1865 |
This object is the instance of the Thuban Application class. |
1866 |
Except maybe for loading or savinf sessions, you will not |
1867 |
need this object for a simple extension. |
1868 |
See Thuban/UI/application.py for the API. |
1869 |
</para> |
1870 |
</listitem> |
1871 |
<listitem> |
1872 |
<para>session: |
1873 |
The instance of the current session. It manages the sessions' |
1874 |
map and tables. You can set and remove the map or tables. |
1875 |
In may also get the map object. However, you should know that |
1876 |
internally it is already prepared to handle many maps. |
1877 |
Therfore, currently you would always receive a list with exactlty |
1878 |
one element. In the future, if there are more than one map, |
1879 |
you will not know which one is the currently display one and |
1880 |
therefore you should use the mainwindow as hook to find |
1881 |
the currently displayed map. |
1882 |
See Thuban/Model/session.py for the API. |
1883 |
</para> |
1884 |
</listitem> |
1885 |
<listitem> |
1886 |
<para> |
1887 |
mainwindow: The mainwindow object is central to manage various |
1888 |
GUI things such as the Legend sub-window. Most notably, |
1889 |
you get access to the canvas which is the window part where |
1890 |
the map is drawn. The canvas knows, which map it currently |
1891 |
draws and therefore you get the current map via |
1892 |
context.mainwindow.canvas.Map(). |
1893 |
See Thuban/UI/mainwindow.py for the API. |
1894 |
</para> |
1895 |
</listitem> |
1896 |
</itemizedlist> |
1897 |
</para> |
1898 |
</section> |
1899 |
</section> |
1900 |
</chapter> |
1901 |
|
1902 |
<chapter><title>Trouble Shooting</title> |
1903 |
<para> |
1904 |
Here are a few problems that users have encountered when first using Thuban. |
1905 |
</para> |
1906 |
<para> |
1907 |
|
1908 |
<itemizedlist> |
1909 |
<listitem> |
1910 |
<para>After adding two or more layers nothing is drawn in the map window. |
1911 |
</para> |
1912 |
<para> |
1913 |
This is probably because the layers have different projections. Projections |
1914 |
must be set on all layers and on the map itself if the layers' projections |
1915 |
are different. |
1916 |
</para> |
1917 |
</listitem> |
1918 |
|
1919 |
<listitem> |
1920 |
<para>Thuban crashes on startup with the error |
1921 |
<literal>NameError: global name 'False' is not defined</literal>. |
1922 |
</para> |
1923 |
<para> |
1924 |
<varname>True</varname> and <varname>False</varname> were only introduced |
1925 |
in Python 2.2.1. Thuban depends on at least Python 2.2.1. |
1926 |
</para> |
1927 |
</listitem> |
1928 |
|
1929 |
<listitem> |
1930 |
<para>After compiling Thuban, Thuban crashes with an error similar to |
1931 |
<literal> |
1932 |
ImportError: /usr/local//lib/thuban/Thuban/../Lib/wxproj.so: undefined symbol: __gxx_personality_v0 |
1933 |
</literal> |
1934 |
</para> |
1935 |
<para> |
1936 |
Thuban depends on the wxWindows library. If Thuban is compiled with an |
1937 |
incompatible version of the compiler than wxWindows was compiled with |
1938 |
this error may occur. Try compiling with a different version of the |
1939 |
compiler. |
1940 |
</para> |
1941 |
</listitem> |
1942 |
</itemizedlist> |
1943 |
</para> |
1944 |
<para> |
1945 |
If an error occurs Thuban will display a dialog indicating the error |
1946 |
before closing. The text should be copied and reported to the |
1947 |
<ulink url="http://thuban.intevation.org/bugtracker.html"> |
1948 |
Intevation bugtracker |
1949 |
</ulink>. |
1950 |
More information about the system is available from |
1951 |
<menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box. |
1952 |
This should also be included in the bug report. |
1953 |
<figure> |
1954 |
<title>Error Dialog</title> |
1955 |
<mediaobject> |
1956 |
<imageobject><imagedata fileref="../images/8_int_error.png" format="PNG" scale="&imgscale;"/></imageobject> |
1957 |
<imageobject><imagedata fileref="./images/8_int_error.eps" format="EPS" scale="&imgscale;"/></imageobject> |
1958 |
</mediaobject> |
1959 |
</figure> |
1960 |
</para> |
1961 |
|
1962 |
</chapter> |
1963 |
|
1964 |
<appendix><title>Supported Data Sources</title> |
1965 |
<para> |
1966 |
</para> |
1967 |
<variablelist> |
1968 |
<varlistentry> |
1969 |
<term>Shapefile</term> |
1970 |
<listitem> |
1971 |
<para> |
1972 |
The Shapefile format has become a standard format for saving |
1973 |
geographic vector information. It supports polygons, lines, and |
1974 |
points. |
1975 |
|
1976 |
<ulink url="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf"> |
1977 |
Technical Specification. |
1978 |
</ulink> |
1979 |
</para> |
1980 |
</listitem> |
1981 |
</varlistentry> |
1982 |
|
1983 |
<varlistentry> |
1984 |
<term>dBase file</term> |
1985 |
<listitem> |
1986 |
<para> |
1987 |
dBase files are used to store the attributes for each layer. This |
1988 |
is closely associated with the Shapefile format. For detailed |
1989 |
specifications on the correct format of a dBase file used with |
1990 |
Thuban please see the Technical Specification for the Shapefile |
1991 |
format above. |
1992 |
</para> |
1993 |
</listitem> |
1994 |
</varlistentry> |
1995 |
|
1996 |
<varlistentry> |
1997 |
<term>PostGIS</term> |
1998 |
<listitem> |
1999 |
<para> |
2000 |
PostGIS adds support for geographic objects to the PostgreSQL |
2001 |
object-relational database. Different layer types (as for Shapefiles) |
2002 |
are supported. <ulink url="http://postgis.refractions.net">PostGIS |
2003 |
Homepage</ulink> |
2004 |
</para> |
2005 |
</listitem> |
2006 |
</varlistentry> |
2007 |
|
2008 |
<varlistentry> |
2009 |
<term>Raster files</term> |
2010 |
<listitem> |
2011 |
<para> |
2012 |
Binding the GDAL library Thuban supports numerous raster file formats, |
2013 |
see <ulink url="http://www.remotesensing.org/gdal/formats_list.html"> |
2014 |
GDAL format list</ulink> for details.</para> |
2015 |
|
2016 |
<para>Most commonly used is the <emphasis>TIFF/GeoTIFF</emphasis> |
2017 |
format: Raster maps are provided as TIFF images, with an additional |
2018 |
"world file" storing the geographic reference (usually with an |
2019 |
extension ".tfw"). |
2020 |
</para> |
2021 |
</listitem> |
2022 |
</varlistentry> |
2023 |
|
2024 |
</variablelist> |
2025 |
</appendix> |
2026 |
|
2027 |
<appendix><title>Working with PostGIS</title> |
2028 |
<para> |
2029 |
This section focusses on the use of PostGIS in the Thuban framework. For |
2030 |
installation and maintenance of spatial databases we refer to the |
2031 |
<ulink url="http://postgis.refractions.net">PostGIS Homepage</ulink>. |
2032 |
The Thuban PostGIS support requires the |
2033 |
<ulink url="http://initd.org/software/psycopg">psycopg module</ulink>. |
2034 |
</para> |
2035 |
|
2036 |
<para> |
2037 |
Working with PostGIS Databases is seperated into two steps: |
2038 |
<itemizedlist> |
2039 |
<listitem><para>Opening a Database Connection</para></listitem> |
2040 |
<listitem><para>Loading a Data Layer</para></listitem> |
2041 |
</itemizedlist> |
2042 |
</para> |
2043 |
<section><title>Opening a Database Connection</title> |
2044 |
<para> |
2045 |
Before a data layer can be loaded from a PostGIS database a |
2046 |
connection with the database has to be established. |
2047 |
<menuchoice> |
2048 |
<guimenu>Session</guimenu> |
2049 |
<guimenuitem>Database Connections ...</guimenuitem> |
2050 |
</menuchoice> opens a dialog for database connection |
2051 |
management. In the dialog new connections can be added |
2052 |
and existing ones can be removed. Removing a database |
2053 |
connection is not possible if the map still displays a |
2054 |
layer provided by this database connection. |
2055 |
</para> |
2056 |
<figure> |
2057 |
<title>Database Management Dialog</title> |
2058 |
<mediaobject> |
2059 |
<imageobject><imagedata fileref="../images/app_postgis_db_management.png" format="PNG" scale="&imgscale;"/></imageobject> |
2060 |
<imageobject><imagedata fileref="./images/app_postgis_db_management.eps" format="EPS" scale="&imgscale;"/></imageobject> |
2061 |
</mediaobject> |
2062 |
</figure> |
2063 |
|
2064 |
<para> |
2065 |
To add a new database connection to the session a dialog is |
2066 |
opened to specify the relevant connection data. Enter all |
2067 |
data relevant for your connection. If the connection fails |
2068 |
the dialog remains open and provides some hints on the failure. |
2069 |
</para> |
2070 |
<figure> |
2071 |
<title>Add Database Dialog</title> |
2072 |
<mediaobject> |
2073 |
<imageobject><imagedata fileref="../images/app_postgis_db_add.png" format="PNG" scale="&imgscale;"/></imageobject> |
2074 |
<imageobject><imagedata fileref="./images/app_postgis_db_add.eps" format="EPS" scale="&imgscale;"/></imageobject> |
2075 |
</mediaobject> |
2076 |
</figure> |
2077 |
|
2078 |
<para> |
2079 |
It is important to note that information on database connections are |
2080 |
also stored with the session. Passwords are NOT stored. If you load a |
2081 |
session with database connections you are asked to enter these |
2082 |
passwords again where required. |
2083 |
</para> |
2084 |
|
2085 |
</section> |
2086 |
|
2087 |
<section><title>Loading a Data Layer</title> |
2088 |
<para> |
2089 |
Data layers as part of a map are loaded with the |
2090 |
<menuchoice> |
2091 |
<guimenu>Map</guimenu> |
2092 |
<guimenuitem>Add Database Layer ...</guimenuitem> |
2093 |
</menuchoice> menu item. A dialog is raised displaying two choice |
2094 |
lists. In the left list all connected databases are shown. |
2095 |
Highlighting |
2096 |
one of these and issuing a retrieval results in a list of available |
2097 |
layer tables from that database. After selection of a |
2098 |
layer the dialog is closed. |
2099 |
</para> |
2100 |
<figure> |
2101 |
<title>Add Database Dialog</title> |
2102 |
<mediaobject> |
2103 |
<imageobject><imagedata fileref="../images/app_postgis_add_layer.png" format="PNG" scale="&imgscale;"/></imageobject> |
2104 |
<imageobject><imagedata fileref="./images/app_postgis_add_layer.eps" format="EPS" scale="&imgscale;"/></imageobject> |
2105 |
</mediaobject> |
2106 |
</figure> |
2107 |
|
2108 |
</section> |
2109 |
|
2110 |
</appendix> |
2111 |
|
2112 |
<appendix><title>Supported Projections</title> |
2113 |
<para> |
2114 |
The following types of projections are directly support by |
2115 |
Thuban. The specific values for each are provided by the user |
2116 |
to create custom projections. Thuban comes with predefined |
2117 |
projections which are available through the Projections dialog. |
2118 |
</para> |
2119 |
<itemizedlist> |
2120 |
<listitem> |
2121 |
<para>Geographic</para> |
2122 |
<itemizedlist> |
2123 |
<listitem><para><literal>Ellipsoid</literal></para></listitem> |
2124 |
<listitem><para> |
2125 |
<literal>Source Data</literal>: either Degrees or Radians |
2126 |
</para></listitem> |
2127 |
</itemizedlist> |
2128 |
</listitem> |
2129 |
<listitem> |
2130 |
<para>Lambert Conic Conformal</para> |
2131 |
<itemizedlist> |
2132 |
<listitem><para><literal>Ellipsoid</literal></para></listitem> |
2133 |
<listitem><para><literal>Latitude of 1st standard parallel</literal></para></listitem> |
2134 |
<listitem><para><literal>Latitude of 2nd standard parallel</literal></para></listitem> |
2135 |
<listitem><para><literal>Central Meridian</literal></para></listitem> |
2136 |
<listitem><para><literal>Latitude of Origin</literal></para></listitem> |
2137 |
<listitem><para><literal>False Easting</literal> (meters)</para></listitem> |
2138 |
<listitem><para><literal>False Northing</literal> (meters)</para></listitem> |
2139 |
</itemizedlist> |
2140 |
</listitem> |
2141 |
<listitem> |
2142 |
<para>Transverse Mercator</para> |
2143 |
<itemizedlist> |
2144 |
<listitem><para><literal>Ellipsoid</literal></para></listitem> |
2145 |
<listitem><para><literal>Latitude</literal>of origin</para></listitem> |
2146 |
<listitem><para><literal>Longitude</literal>at central meridian</para></listitem> |
2147 |
<listitem><para><literal>Scale Factor</literal>at central meridian</para></listitem> |
2148 |
<listitem><para><literal>False Easting</literal> (meters)</para></listitem> |
2149 |
<listitem><para><literal>False Northing</literal> (meters)</para></listitem> |
2150 |
</itemizedlist> |
2151 |
</listitem> |
2152 |
<listitem> |
2153 |
<para>Universal Transverse Mercator</para> |
2154 |
<itemizedlist> |
2155 |
<listitem><para><literal>Ellipsoid</literal></para></listitem> |
2156 |
<listitem><para><literal>Zone</literal> |
2157 |
(can be guessed appling the Propose button)</para></listitem> |
2158 |
<listitem><para><literal>Southern Hemisphere</literal> flag</para></listitem> |
2159 |
</itemizedlist> |
2160 |
</listitem> |
2161 |
</itemizedlist> |
2162 |
|
2163 |
<para> |
2164 |
Thuban comes with a sample set of map projections for various |
2165 |
European countries. Apart from the basic projection they differ |
2166 |
especially in their parameterization: |
2167 |
</para> |
2168 |
<itemizedlist> |
2169 |
<listitem><para>Belgium Datum 1972 (Lambert Conic Conformal)</para> |
2170 |
</listitem> |
2171 |
|
2172 |
<listitem><para>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</para> |
2173 |
</listitem> |
2174 |
|
2175 |
<listitem><para>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor) |
2176 |
</para> |
2177 |
</listitem> |
2178 |
|
2179 |
<listitem><para>Reseau Geodesique Francaise |
2180 |
(France, Lambert Conic Conformal)</para> |
2181 |
</listitem> |
2182 |
|
2183 |
<listitem><para>UK National Grid (United Kingdom, Transverse Mercartor) |
2184 |
</para> |
2185 |
</listitem> |
2186 |
</itemizedlist> |
2187 |
|
2188 |
<para> |
2189 |
Thuban uses the comprehensive PROJ library for projections. PROJ provides |
2190 |
more than the four commonly used projections described above. If needed |
2191 |
Thuban can be easily extended to a new projection covered by PROJ. |
2192 |
</para> |
2193 |
</appendix> |
2194 |
|
2195 |
</book> |
2196 |
|