/[thuban]/branches/WIP-pyshapelib-bramz/Doc/manual/thuban-manual-de.xml
ViewVC logotype

Contents of /branches/WIP-pyshapelib-bramz/Doc/manual/thuban-manual-de.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2508 - (show annotations)
Mon Dec 27 09:05:43 2004 UTC (20 years, 2 months ago) by jan
Original Path: trunk/thuban/Doc/manual/thuban-manual-de.xml
File MIME type: text/xml
File size: 88770 byte(s)
More translations.

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 Das Legenden-Fenster ist lösbar. Das bedeutet, dass sie vom Hauptfenster
440 abgelöst und dann als eigenständiges Fenster
441 positioniert werden kann. Dies wird durch den kleinen Schalter
442 neben dem X gemacht. Erneutes Anwählen des Schalters läßt das
443 Legenden-Fenster wieder in das Hauptfenster integrieren.
444 </para>
445 <para>
446 Die Status-Leiste zeigt verschiedene Informationen jeweils
447 abhängig vom Kontext. Wählt der Benutzer einen Menüpunkt
448 dann wird in der Status-Leiste ein Hilfetext zu dem jeweiligen
449 Menüpunkt angezeigt.
450 Ist eines der Werkzeuge aktiviert, so wird in der Status-Leiste
451 die Position angegeben über der der Maus-Cursor auf der Karte
452 steht.
453 </para>
454 <para>
455 Die Werkzeugleiste erlaubt direkten Zugriff auf häufig
456 benötigte Werkzeuge.
457 Schwebt der Maus-Zeiger über einem Knopf wird eine Kurz-Info
458 über das jeweilige Werkzeug gegeben.
459 Folgende Werzeuge stehen zur Verfügung: Hineinzoomen,
460 Herauszoomen, Verschieben, Zur vollen Kartenausdehnung zoomen,
461 Zur vollen Ebenenausdehnung zoomen, Zur vollen Auswahlausdehnung zoomen,
462 Identifizieren, Labels hinzufügen/entfernen.
463 Alle Werkzeuge werden in diesem Handbuch noch detaillierter beschrieben.
464 </para>
465 </section>
466
467 </chapter>
468
469 <chapter><title>Session Management</title>
470
471 <section><title>Eine neue Session beginnen</title>
472 <para>
473 Eine neue Session wird gestartet über
474 <menuchoice>
475 <guimenu>Datei</guimenu>
476 <guimenuitem>Neue Session</guimenuitem>
477 </menuchoice>.
478 Falls bereits eine Session geladen ist und seit der letzten
479 Speicherung verändert wurde, so wird nun nachgefragt, ob
480 diese Session zunächst gespeichert werden soll.
481 Eine neue Session besteht aus einer leeren Karte
482 ohne Ebenen, Tabellen und Projektion.
483 </para>
484 </section>
485
486 <section><title>Eine Session öffnen</title>
487 <para>
488 Eine Session kann geöffnet werden über
489 <menuchoice>
490 <guimenu>Datei</guimenu>
491 <guimenuitem>Öffne Session</guimenuitem>
492 </menuchoice>.
493 Es wird ein Dateiauswahl-Dialog geöffnet um eine
494 Thuban Session Datei auszuwählen. Diese Dateien enden
495 auf <varname>.thuban</varname>. Wird eine Datei ausgewählt und mit
496 <guibutton>OK</guibutton> bestätigt, so wird die entsprechende
497 Session in Thuban geladen.
498
499 Ist bereits eine Session geladen und seit dem letzten Speichern modifiziert
500 worden, so wird nachgefragt, ob zunächst die alte Session gespeichert werden
501 soll.
502 </para>
503 </section>
504
505 <section><title>Eine Session speichern</title>
506 <para>
507 Eine Session kann gepsiechert werden über
508 <menuchoice>
509 <guimenu>Datei</guimenu>
510 <guimenuitem>Session Speichern</guimenuitem>
511 </menuchoice>.
512 Handelt es sich bei der aktuellen Session nicht um eine
513 neue und ungespeicherte, so wird die entsprechende Datei
514 mit den Daten der aktuellen Session überschrieben.
515 Im Falle einer neuen und noch nicht gespeicherten Session
516 wird ein Dateiauswahl-Dialog geöffnet um einen Namen
517 für die zu speicherende Session auszuwählen.
518 Thuban Session Dateien sollten mit der Endung
519 <varname>.thuban</varname> versehen werden.
520 Existiert bereits eine Datei mit dem gleichen Namen
521 wird der Benutzer gefragt ob diese überschrieben
522 oder ein neuer Name gewählt werden soll.
523 </para>
524 </section>
525
526 <section><title>Der Session Info-Baum</title>
527 <para>
528 <figure>
529 <title>Session Info-Baum</title>
530 <mediaobject>
531 <imageobject><imagedata fileref="../images/2_4_session_tree.png" format="PNG" scale="&imgscale;"/></imageobject>
532 <imageobject><imagedata fileref="./images/2_4_session_tree.eps" format="EPS" scale="&imgscale;"/></imageobject>
533 </mediaobject>
534 </figure>
535 </para>
536 <para>
537 Der Session Info-Baum ist hauptsächlich für Software-Entwickler gedacht
538 die an Thuban arbeiten.
539 Er stellt eine Reihe von internen Daten zur Session, der Karte, den
540 Ebenen usw. dar. Er wird geöffnet über
541 <menuchoice>
542 <guimenu>Datei</guimenu>
543 <guimenuitem>Session Baum</guimenuitem>
544 </menuchoice>.
545 </para>
546 </section>
547 </chapter>
548
549 <chapter><title>Karten Management</title>
550 <para>
551 Die Karte besteht aus eine Anzahl Ebenen wobei jede Ebene einen
552 Datensatz mit bestimtem Typ repräsentiert. Mit Interaktion auf der
553 Karte kann ein Benutzer die Daten visuell erforschen.
554 </para>
555 <para>
556 Die Karte kann einen Namen haben der dann in der Kopfzeile des
557 Thuban Fensters auftaucht. Der Kartenname kann geändert werden
558 über
559 <menuchoice>
560 <guimenu>Karte</guimenu>
561 <guimenuitem>Umbennen</guimenuitem>
562 </menuchoice>.
563 </para>
564 <para>
565 <inlinemediaobject>
566 <imageobject>
567 <imagedata fileref="../images/3_rename_map.png" format="PNG" scale="&imgscale;"/>
568 </imageobject>
569 <imageobject>
570 <imagedata fileref="./images/3_rename_map.eps" format="EPS" scale="&imgscale;"/>
571 </imageobject>
572 <textobject> <phrase>Karte umbennen</phrase> </textobject>
573 </inlinemediaobject>
574 </para>
575
576 <section><title>Hinzufügen und Entfernen von Ebenen</title>
577 <para>
578 Es gibt drei Typen von Ebenen aus denen eine Karte besteht:
579 Shape Ebene, Datenbank Ebene und Bildebene.
580 Shape Ebenen sind im Shapefile Format gespeichert welches
581 weit verbreitet für die Speicherung von geografischen Objekten
582 genutzt wird.
583 Die Dateien haben die Endung ``.shp''. Mit der eigentlichen Shape
584 Datei ist eine Datenbank Datei welche die Attribut-Daten zu dem
585 Shapefile enthält. Diese Datenbank Datei verwendet das dBase Format
586 und hat die Endung ``.dbf''. Beide Dateien müssen den selben
587 Basisnamen haben. So gehören zum Beispiel die Dateien
588 strassen.shp und strassen.dbf zusammen.
589 </para>
590 <itemizedlist>
591 <listitem>
592 <para>
593 Shape Ebenen können zur Karte hinzugefügt werden mit
594 <menuchoice>
595 <guimenu>Karte</guimenu>
596 <guimenuitem>Ebene hinzufügen</guimenuitem>
597 </menuchoice>.
598 Zunächst werden im Dateiauswahl Dialog nur die ``.shp'' Dateien
599 angezeigt, was für die Auswahl vollkommen ausreicht.
600 Falls Sie aber auf Ansicht aller Dateien umschalten, und dann
601 einer der assoziierten Dateien (z.B. mit der Endung ``.dbf'')
602 auswählen, so verwendet Thuban den Basisnamen um die entsprechende
603 Shape Datei zu laden,
604 </para>
605 <para>
606 Der Dateidialog für Shape Dateien erlaubt es auch, viele
607 Dateien gleichzeitig auszuwählen. Verwenden Sie dafür
608 die Umschalt-Taste gleichzeitig mit der linken Maustaste um
609 die Auswahl zu erweitern.
610 </para>
611 </listitem>
612
613 <listitem>
614 <para>Datenbankebenen können zu Karte hinzugefügt werden mit
615 <menuchoice>
616 <guimenu>Karte</guimenu>
617 <guimenuitem>Datenbankebene hinzufügen</guimenuitem>
618 </menuchoice>.
619 Es wird ein Duialog mit zwei Listen geöffnet.
620 Die linke Liste zeigt alle derzeit offenen Datenbankverbindungen dieser
621 Session an. Eine Liste der verfügbaren Ebenen aus einer Datenbankverbindung
622 wird steht auf der rechten Seite. Aus dieser Liste können Sie eine
623 beliebige Ebene zum Öffnen auswählen. Der Dialog wird dabach
624 automatisch beendet.
625 </para>
626 <para>
627 Siehe auch Anhang ``Mit PostGIS arbeiten'' für weitere Details.
628 </para>
629 </listitem>
630
631 <listitem>
632 <para>
633 Bildebenen können zur Karte hinzugefügt werden mit
634 <menuchoice>
635 <guimenu>Karte</guimenu>
636 <guimenuitem>Bildebene hinzufügen</guimenuitem>
637 </menuchoice>.
638 Es ist wichtig, dass eine korrekte Bilddatei ausgewählt für
639 die auch geographische Daten (Projektions) vorliegen.
640 Diese Daten können in die Bilddatei eingebettet sein oder
641 als separate Datei vorliegen. Können diese Daten nicht
642 gefunden werden, so wird Thuban einen Fehler melden.
643 </para>
644 </listitem>
645 </itemizedlist>
646 </section>
647
648 <section><title>Navigation</title>
649 <para>
650 Die Karte kann erforscht werden indem die Navigationswerkzeuge
651 aus der Werkzeugleiste oder über das Menü
652 <menuchoice><guimenu>Karte</guimenu></menuchoice> ausgewählt werden.
653 </para>
654 <itemizedlist>
655 <listitem>
656 <para>
657 Das ZoomIn Werkzeug
658 <inlinemediaobject>
659 <imageobject>
660 <imagedata fileref="../images/3_2_zoomin.png" format="PNG" scale="&imgscale;"/>
661 </imageobject>
662 <imageobject>
663 <imagedata fileref="./images/3_2_zoomin.eps" format="EPS" scale="&imgscale;"/>
664 </imageobject>
665 <textobject> <phrase>ZoomIn Werkzeug</phrase> </textobject>
666 </inlinemediaobject>
667 vergrößert einen Bereich aus der Karte. Ein einmaliges Klicken auf
668 die Karte vergrößert die Karte um das Doppelte und zentriert auf den
669 angewählten Punkt. Klicken und Ziehen selektiert einen Bereich
670 der dann so vergrößert wird, dass er das Fenster ausfüllt.
671 </para>
672 </listitem>
673 <listitem>
674 <para>
675 Das ZoomOut Werkzeug
676 <inlinemediaobject>
677 <imageobject>
678 <imagedata fileref="../images/3_2_zoomout.png" format="PNG" scale="&imgscale;"/>
679 </imageobject>
680 <imageobject>
681 <imagedata fileref="./images/3_2_zoomout.eps" format="EPS" scale="&imgscale;"/>
682 </imageobject>
683 <textobject> <phrase>ZoomOut Werkzeug</phrase> </textobject>
684 </inlinemediaobject>
685 verkleinert die Karte, so dass ein größerer Bereich zu sehen ist.
686 Ein einzelnen Klick verkleinert die Karte um Faktor 2.
687 Klicken und Ziehen selektiert einen Bereich in den die gesamte sichtbare
688 Karte im Fenster hineinverkleinert wird.
689 </para>
690 </listitem>
691 <listitem>
692 <para>
693 Das Verschieben Werkzeug
694 <inlinemediaobject>
695 <imageobject>
696 <imagedata fileref="../images/3_2_pan.png" format="PNG" scale="&imgscale;"/>
697 </imageobject>
698 <imageobject>
699 <imagedata fileref="./images/3_2_pan.eps" format="EPS" scale="&imgscale;"/>
700 </imageobject>
701 <textobject> <phrase>Verschieben Werkzeug</phrase> </textobject>
702 </inlinemediaobject>
703 gestattet es dem Benutzer die Karte durch klicken und
704 ziehen mit gedrückter Maustaste zu verschieben.
705 </para>
706 </listitem>
707 <listitem>
708 <para>
709 Das Volle Ausdehnung Werkzeug
710 <inlinemediaobject>
711 <imageobject>
712 <imagedata fileref="../images/3_2_fullextent.png" format="PNG" scale="&imgscale;"/>
713 </imageobject>
714 <imageobject>
715 <imagedata fileref="./images/3_2_fullextent.eps" format="EPS" scale="&imgscale;"/>
716 </imageobject>
717 <textobject> <phrase>Volle Ausdehnung Werkzeug</phrase> </textobject>
718 </inlinemediaobject>
719 skaliert die Zoom-Stufe so, dass die gesamte sichtbare Karte im
720 Fenster dargestellt wird.
721 </para>
722 </listitem>
723 <listitem>
724 <para>
725 Das Voll Ebenen-Ausdehnung Werkzeug
726 <inlinemediaobject>
727 <imageobject>
728 <imagedata fileref="../images/3_2_fulllayerextent.png" format="PNG" scale="&imgscale;"/>
729 </imageobject>
730 <imageobject>
731 <imagedata fileref="./images/3_2_fulllayerextent.eps" format="EPS" scale="&imgscale;"/>
732 </imageobject>
733 <textobject> <phrase>Volle Ebenen-Ausdehnung Werkzeug</phrase> </textobject>
734 </inlinemediaobject>
735 skaliert die Zoom-Stufe so, dass die akutelle Ebene vollständig
736 im Fenster dargestellt wird. Ist keine Ebene ausgewählt, so
737 ist dieser Knopf ausgegraut und damit nicht verfügbar.
738 </para>
739 </listitem>
740 <listitem>
741 <para>
742 Das Volle Shape-Ausdehnung Werkzeug
743 <inlinemediaobject>
744 <imageobject>
745 <imagedata fileref="../images/3_2_fullshapeextent.png" format="PNG" scale="&imgscale;"/>
746 </imageobject>
747 <imageobject>
748 <imagedata fileref="./images/3_2_fullshapeextent.eps" format="EPS" scale="&imgscale;"/>
749 </imageobject>
750 <textobject> <phrase>Volle Shape-Ausdehnung Werkzeug</phrase> </textobject>
751 </inlinemediaobject>
752 skaliert die Zoom-Stufe so, dass die aktuell ausgewählten Shapes
753 vollständig in das Fenster eingepasst sind.
754 Handelt es sich bei der Auswahl nur um einen einzelnen Punkt
755 so wird dieser zentriert dargestellt und bis zu einem gewissen
756 grad gezoomed.
757 Ist kein Shape selektiert, so ist dieser Knopf ausgegraut und damit
758 nicht verfügbar.
759 Dieses Werkzeug ist besonders für den Fall hilfreich wenn man Objekte
760 in einer Ebenen-Tabelle auswählt und sie auf der Karte schnell
761 anspringen machen möchte.
762 </para>
763 </listitem>
764 </itemizedlist>
765 </section>
766
767 <section><title>Object Identification</title>
768 <para>
769 Objects on the map can be identified using the Identify tool
770 <inlinemediaobject>
771 <imageobject>
772 <imagedata fileref="../images/3_3_identify.png" format="PNG" scale="&imgscale;"/>
773 </imageobject>
774 <imageobject>
775 <imagedata fileref="./images/3_3_identify.eps" format="EPS" scale="&imgscale;"/>
776 </imageobject>
777 <textobject> <phrase>Identify Tool</phrase> </textobject>
778 </inlinemediaobject>.
779 Clicking on an object selects that object and opens a dialog which
780 shows all the table attributes for that object. Any current selection
781 is lost. Objects on the map are typically shapes and this document
782 will often refer to objects as shapes.
783 </para>
784 </section>
785
786 <section><title>Object Labeling</title>
787 <para>
788 Objects can be labeled using the Label tool
789 <inlinemediaobject>
790 <imageobject>
791 <imagedata fileref="../images/3_3_label.png" format="PNG" scale="&imgscale;"/>
792 </imageobject>
793 <imageobject>
794 <imagedata fileref="./images/3_3_label.eps" format="EPS" scale="&imgscale;"/>
795 </imageobject>
796 <textobject> <phrase>Label Tool</phrase> </textobject>
797 </inlinemediaobject>.
798 Clicking on an object selects that object and opens a dialog which
799 displays the table attributes for that object. An attribute can
800 be selected to be the label on the map. The label will be placed
801 at the center of the shape. Clicking on an object that already has
802 a label will remove the label.
803 </para>
804 </section>
805
806 <section><title>The Legend</title>
807 <para>
808 <inlinemediaobject>
809 <imageobject>
810 <imagedata fileref="../images/3_5_legend.png" format="PNG" scale="&imgscale;"/>
811 </imageobject>
812 <imageobject>
813 <imagedata fileref="./images/3_5_legend.eps" format="EPS" scale="&imgscale;"/>
814 </imageobject>
815 <textobject> <phrase>Legend</phrase> </textobject>
816 </inlinemediaobject>
817 </para>
818 <para>
819 The Legend provides an overview of the layers in the map. Layers
820 that appear higher in the legend will appear ``closer'' to the user.
821 If a layer supports classification (currently, only shape layers
822 have this feature) then the classification groups will be shown
823 below each layer. The properties for each group are also displayed
824 with a small graphic. Polygon layers appear as rectangles, lines
825 appear as curved lines, and points appear as circles.
826 </para>
827 <para>
828 Along the top of the legend is a toolbar which allows quick access
829 to some of the layer manipulation options under
830 <menuchoice><guimenu>Map</guimenu></menuchoice>.
831 </para>
832
833 <itemizedlist>
834 <listitem>
835 <para>
836 The Move Layer to Top tool
837 <inlinemediaobject>
838 <imageobject>
839 <imagedata fileref="../images/3_5_totop.png" format="PNG" scale="&imgscale;"/>
840 </imageobject>
841 <imageobject>
842 <imagedata fileref="./images/3_5_totop.eps" format="EPS" scale="&imgscale;"/>
843 </imageobject>
844 <textobject> <phrase>Move Layer to Top</phrase> </textobject>
845 </inlinemediaobject> raises the selected layer to the top of the map.
846 </para>
847 </listitem>
848 <listitem>
849
850 <para>
851 The Move Layer Up tool
852 <inlinemediaobject>
853 <imageobject>
854 <imagedata fileref="../images/3_5_moveup.png" format="PNG" scale="&imgscale;"/>
855 </imageobject>
856 <imageobject>
857 <imagedata fileref="./images/3_5_moveup.eps" format="EPS" scale="&imgscale;"/>
858 </imageobject>
859 <textobject> <phrase>Move Layer Up</phrase> </textobject>
860 </inlinemediaobject> raises the selected layer one level.
861 </para>
862 </listitem>
863 <listitem>
864
865 <para>
866 The Move Layer Down tool
867 <inlinemediaobject>
868 <imageobject>
869 <imagedata fileref="../images/3_5_movedown.png" format="PNG" scale="&imgscale;"/>
870 </imageobject>
871 <imageobject>
872 <imagedata fileref="./images/3_5_movedown.eps" format="EPS" scale="&imgscale;"/>
873 </imageobject>
874 <textobject> <phrase>Move Layer Down</phrase> </textobject>
875 </inlinemediaobject> lowers the selected layer one level.
876 </para>
877
878 </listitem>
879 <listitem>
880 <para>
881 The Move Layer to Bottom tool
882 <inlinemediaobject>
883 <imageobject>
884 <imagedata fileref="../images/3_5_tobottom.png" format="PNG" scale="&imgscale;"/>
885 </imageobject>
886 <imageobject>
887 <imagedata fileref="./images/3_5_tobottom.eps" format="EPS" scale="&imgscale;"/>
888 </imageobject>
889 <textobject> <phrase>Move Layer to Bottom</phrase> </textobject>
890 </inlinemediaobject> lowers the selected layer to the bottom of the map.
891 </para>
892
893 </listitem>
894 <listitem>
895 <para>
896 The Visible tool
897 <inlinemediaobject>
898 <imageobject>
899 <imagedata fileref="../images/3_5_visible.png" format="PNG" scale="&imgscale;"/>
900 </imageobject>
901 <imageobject>
902 <imagedata fileref="./images/3_5_visible.eps" format="EPS" scale="&imgscale;"/>
903 </imageobject>
904 <textobject> <phrase>Visible</phrase> </textobject>
905 </inlinemediaobject> shows the selected layer in the map if it was
906 hidden.
907 </para>
908
909 </listitem>
910 <listitem>
911 <para>
912 The Invisible tool
913 <inlinemediaobject>
914 <imageobject>
915 <imagedata fileref="../images/3_5_invisible.png" format="PNG" scale="&imgscale;"/>
916 </imageobject>
917 <imageobject>
918 <imagedata fileref="./images/3_5_invisible.eps" format="EPS" scale="&imgscale;"/>
919 </imageobject>
920 <textobject> <phrase>Invisible</phrase> </textobject>
921 </inlinemediaobject> hides the selected layer in the map.
922 </para>
923
924 </listitem>
925 <listitem>
926 <para>
927 The Properties tool
928 <inlinemediaobject>
929 <imageobject>
930 <imagedata fileref="../images/3_5_props.png" format="PNG" scale="&imgscale;"/>
931 </imageobject>
932 <imageobject>
933 <imagedata fileref="./images/3_5_props.eps" format="EPS" scale="&imgscale;"/>
934 </imageobject>
935 <textobject> <phrase>Properties</phrase> </textobject>
936 </inlinemediaobject> opens the layer's properties dialog box.
937 Double-clicking on a layer or a group of a layer will open the
938 properties dialog for that layer.
939 </para>
940 </listitem>
941 </itemizedlist>
942
943 <para>
944 The most used layer related actions are also available from a
945 popup menu. It is raised when a layer is clicked with the right mouse
946 button.
947 </para>
948
949 <para>
950 <figure>
951 <title>Layer Popup Menu</title>
952 <mediaobject>
953 <imageobject><imagedata fileref="../images/3_5_popup_menu.png" format="PNG" scale="&imgscale;"/></imageobject>
954 <imageobject><imagedata fileref="./images/3_5_popup_menu.eps" format="EPS" scale="&imgscale;"/></imageobject>
955 </mediaobject>
956 </figure>
957 </para>
958
959 <para>
960 Along the bottom of the legend is the scalebar. The scalebar
961 will be available if there are any layers and the map has a
962 projection set.
963 </para>
964 </section>
965
966 <section><title>Exporting</title>
967 <para>
968 Under Windows, maps can be exported in Enhanced Metafile format
969 (<varname>.wmf</varname>)
970 from
971 <menuchoice>
972 <guimenu>Map</guimenu>
973 <guimenuitem>Export</guimenuitem>
974 </menuchoice> for use in reports, presentations, or further
975 modification. The current map view, legend, and, if available,
976 scalebar are exported. Under other platforms this option is not
977 available. Clicking this menu item open a file selection dialog
978 that lets the user select a location to export the map.
979 </para>
980 </section>
981
982 <section><title>Printing</title>
983 <para>
984 The map can be printed using
985 <menuchoice>
986 <guimenu>Map</guimenu>
987 <guimenuitem>Print</guimenuitem>
988 </menuchoice>. The current map view, legend, and, if available,
989 scalebar are printed. A standard printing dialog will open allowing
990 the user to configure the printer. This dialog will differ depending
991 on which platform Thuban is running.
992 </para>
993 </section>
994
995 </chapter>
996
997 <chapter><title>Layer Management</title>
998 <para>
999 </para>
1000
1001 <section><title>Types of Layers</title>
1002 <para>
1003 There are three types of layers supported by Thuban: shape layers,
1004 database layers and
1005 image layers. Shape layers consist of vector based shapes with
1006 geo-referenced coordinates. There are three types of supported
1007 shapes: polygons, lines (arc), and points. Database layers are similar
1008 to shape layers but loaded from a database instead of the file system.
1009 Image layers can be any image
1010 file format supported by the Geo-spatial Data Abstraction Library
1011 (GDAL). The images must have geographic
1012 coordinate data either embedded within the file or in a separate
1013 file that is in the same directory as the image file. GeoTIFF files
1014 work very well with Thuban and were designed specifically to be image
1015 layers in GIS programs.
1016 </para>
1017 <para>
1018 All actions in the
1019 <menuchoice>
1020 <guimenu>Layer</guimenu>
1021 </menuchoice> menu act on the currently selected layer in the legend.
1022 </para>
1023 </section>
1024
1025 <section><title>Properties</title>
1026 <para>
1027 To view the properties for a layer it must first be selected in the
1028 legend. The menu option
1029 <menuchoice>
1030 <guimenu>Layer</guimenu>
1031 <guimenuitem>Properties</guimenuitem>
1032 </menuchoice> opens a dialog that displays a layer's properties.
1033 All layers have a title which can be modified in the text field
1034 provided. The type of layer is also shows. If the type is a type
1035 of shape (polygon, arc, point) the classification table will be
1036 shown. Image layers have no other properties other than title
1037 and type.
1038 </para>
1039 <para>
1040 <figure>
1041 <title>Properties Window</title>
1042 <mediaobject>
1043 <imageobject><imagedata fileref="../images/4_2_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
1044 <imageobject><imagedata fileref="./images/4_2_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
1045 </mediaobject>
1046 </figure>
1047 </para>
1048 <para>
1049 <figure>
1050 <title>Properties Window</title>
1051 <mediaobject>
1052 <imageobject><imagedata fileref="../images/4_2_raster_layer_properties.png" format="PNG" scale="&imgscale;"/></imageobject>
1053 <imageobject><imagedata fileref="./images/4_2_raster_layer_properties.eps" format="EPS" scale="&imgscale;"/></imageobject>
1054 </mediaobject>
1055 </figure>
1056 </para>
1057 </section>
1058
1059 <section><title>Visibility</title>
1060 <para>
1061 Sometimes it is not desirable to view all layers at the same time.
1062 Some layers may take a long time to draw and so while navigating
1063 around the map the user may not want to wait for the map to redraw
1064 all the layers each time the map is changed. Each layer can be
1065 independently turned on or off using the
1066 <menuchoice>
1067 <guimenu>Layer</guimenu>
1068 <guimenuitem>Show</guimenuitem>
1069 </menuchoice>
1070 or
1071 <menuchoice>
1072 <guimenu>Layer</guimenu>
1073 <guimenuitem>Hide</guimenuitem>
1074 </menuchoice> options respectively.
1075 </para>
1076 </section>
1077
1078 <section><title>Duplication</title>
1079 <para>
1080 Layers and all their properties, including classifications, can
1081 be duplicated using
1082 <menuchoice>
1083 <guimenu>Layer</guimenu>
1084 <guimenuitem>Duplicate</guimenuitem>
1085 </menuchoice>. Duplicating a layer is useful if the user wishes
1086 to model a layer in several different ways. Even though the layers
1087 overlap, by carefully selecting the shape properties it is possible
1088 to display several pieces of information at once. For example, one
1089 copy of a roads layer may be classified on a length property and
1090 another copy may be classified on a type property. If the length
1091 property was expressed with color and the type property expressed
1092 with line thickness then it would be possible to view both
1093 classifications by placing the type property copy over the
1094 length property copy.
1095 </para>
1096 </section>
1097
1098 </chapter>
1099
1100 <chapter><title>Layer Classifications</title>
1101 <para>
1102 A layer classification is a way of assigning drawing properties to
1103 groups of shapes based on attributes stored in the layer's table.
1104 Only layer's with shapes can have a classification; image layers
1105 cannot be classified.
1106 </para>
1107 <para>
1108 A classification consists of a number of groups, each group
1109 having a value or range of values to match against, and symbol
1110 properties which control how a shape is drawn on the map. The user
1111 selects which field in the table is used by the classification and
1112 when the map is drawn the value for that field for each shape is
1113 compared with each group's value. The properties of the first group
1114 to match are used to draw the shape. This allows the user to get a
1115 visual impression of not only how the data is laid out but also what
1116 kind of data lies where.
1117 </para>
1118 <para>
1119 A layer always has a classification. When a new layer is added to the
1120 map, a default classification is created with the DEFAULT group. This
1121 group cannot be removed but can be hidden (see below). Every shape in the
1122 layer, regardless of its attributes, will match this group if no other
1123 group matches.
1124 </para>
1125
1126 <section><title>Editing Classifications</title>
1127 <para>
1128 A layer's classification can be modified under the properties dialog
1129 (<menuchoice>
1130 <guimenu>Layer</guimenu>
1131 <guimenuitem>Properties</guimenuitem>
1132 </menuchoice>). The layer's classification field can be set to None,
1133 which simply assigns a DEFAULT group to the classification. No new
1134 groups can be added to the classification if the field is None.
1135 The user must first select a field to classify on. New groups can
1136 be added to the classification with the <guibutton>Add</guibutton>
1137 button.
1138 </para>
1139 <para>
1140 To apply the changes to the map the user can click
1141 either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>.
1142 <guibutton>Try</guibutton> will not close the dialog box, allowing
1143 the user to see how the classification changes the map.
1144 <guibutton>Revert</guibutton> will undo the last classification applied
1145 to the map. <guibutton>OK</guibutton> will commit the changes and
1146 close the dialog. The user will be unable to undo the changes.
1147 <guibutton>Close</guibutton> simply closes the dialog box. If any
1148 changes have not been applied with <guibutton>Try</guibutton> the
1149 changes will not be applied to the map.
1150 </para>
1151 <para>
1152 <figure>
1153 <title>Properties Window</title>
1154 <mediaobject>
1155 <imageobject><imagedata fileref="../images/5_classification.png" format="PNG" scale="&imgscale;"/></imageobject>
1156 <imageobject><imagedata fileref="./images/5_classification.eps" format="EPS" scale="&imgscale;"/></imageobject>
1157 </mediaobject>
1158 </figure>
1159 </para>
1160 <para>
1161 The order of the groups in the classification is significant
1162 except for the DEFAULT group, which remains at the top. When shapes
1163 are matched against groups the matching begins at the first group
1164 after the DEFAULT group so that groups higher in the list will
1165 be checked first. Matching for a
1166 given shape will stop at the first group that matches. The user can
1167 use <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton>
1168 to change the order of the groups. The DEFAULT group will always
1169 match a shape that hasn't matched another group.
1170 </para>
1171 <section><title>Visible</title>
1172 <para>
1173 The Visible column has check-boxes that determine whether a
1174 classification group will be displayed in the legend. This is
1175 useful if the user knows that the groups completely cover
1176 the data set and don't want the DEFAULT group to be displayed
1177 in the legend and on a printout.
1178 </para>
1179 </section>
1180 <section><title>Symbols</title>
1181 <para>
1182 Each type of shape has its own type of symbol. Thuban supports three
1183 types of shapes: polygons, lines, and points. Polygons and points
1184 have outline and fill color, while lines have only line color. Each
1185 group has associated symbol properties. To edit the symbol
1186 properties for a group the user can double click on the Symbol
1187 column or select a group and click the
1188 <guibutton>Edit Symbol</guibutton> button.
1189 </para>
1190 </section>
1191 <section><title>Value</title>
1192 <para>
1193 The Value column of the classification table is the value that will
1194 be matched when the map is being drawn. The type of data that can
1195 entered into this field depends on the type of data of the
1196 classification field.
1197 </para>
1198 <para>
1199 If the field is of type Text, anything entered
1200 into the field is valid. The text will be compared literally to the
1201 value of the shape attribute, including case sensitivity.
1202 If the type is Integer, then any valid integer may be entered. In
1203 addition, with special syntax, a range of values can be entered.
1204 A range from <varname>start</varname> to <varname>end</varname>
1205 inclusive is specified like this: <literal>[start;end]</literal>.
1206 The exclusive range is specified like this:
1207 <literal>]start;end[</literal>. Ranges can include infinity like
1208 this: <literal>[-oo;oo]</literal>. Field types can also be of type
1209 Decimal. They represent any rational number and can be used in
1210 ranges as well.
1211 </para>
1212 </section>
1213 <section><title>Label</title>
1214 <para>
1215 By default, the text that is displayed for a group in the legend
1216 is the value for that group. The label can substitute a more
1217 descriptive term in the legend.
1218 </para>
1219 </section>
1220 </section>
1221
1222 <section><title>Generating Classes</title>
1223 <para>
1224 <figure>
1225 <title>Generate Class</title>
1226 <mediaobject>
1227 <imageobject><imagedata fileref="../images/5_3_genclass.png" format="PNG" scale="&imgscale;"/></imageobject>
1228 <imageobject><imagedata fileref="./images/5_3_genclass.eps" format="EPS" scale="&imgscale;"/></imageobject>
1229 </mediaobject>
1230 </figure>
1231 </para>
1232 <para>
1233 Creating a classification by hand can be tedious.
1234 Thuban, therefore, provides a means of generating an entire
1235 classification at once while still giving the user control over
1236 how it appears. Clicking <guibutton>Generate Class</guibutton>
1237 opens the <varname>Generate Classification</varname> dialog.
1238 Under the <varname>Generate</varname> pull down there are at most
1239 three different ways to generate classifications:
1240 Unique Values, Uniform Distribution, and Quantiles. Some options
1241 may not be available if the data type for the field does not
1242 support them. For instance, <varname>Uniform Distribution</varname>
1243 doesn't make sense for a Text field.
1244 </para>
1245 <para>
1246 For every way of generating a classification, a color scheme must
1247 be selected. Thuban provides several different color schemes that
1248 affect how the group properties change over the classification.
1249 It may be desirable that only certain properties change over the
1250 classification. If the shape type is a polygon or a point then
1251 the <guibutton>Fix Border Color</guibutton> option will be available.
1252 This allows the user to select a border color for all classification
1253 groups.
1254 It is also possible to create a custom color scheme. Selecting
1255 this option will display two symbols: the one of the left has the
1256 properties of the first group and the one on the right has the
1257 properties of the last group. Thuban will interpolate between these
1258 two properties to generate the other groups.
1259 <figure>
1260 <title>Custom Color Scheme</title>
1261 <mediaobject>
1262 <imageobject><imagedata fileref="../images/5_2_custom_ramp.png" format="PNG" scale="&imgscale;"/></imageobject>
1263 <imageobject><imagedata fileref="./images/5_2_custom_ramp.eps" format="EPS" scale="&imgscale;"/></imageobject>
1264 </mediaobject>
1265 </figure>
1266 </para>
1267 <para>
1268 The Unique Values option lets the user select specific values that
1269 appear in the table. Clicking <guibutton>Retrieve From Table</guibutton>
1270 searches the table for all unique values and displays them in the
1271 list on the left. Items can be selected and moved to the list on the
1272 right. Each list can be sorted or reversed for easier searching.
1273 The classification that is generated will be in the same order as
1274 the list on the right.
1275 <figure>
1276 <title>Unique Values</title>
1277 <mediaobject>
1278 <imageobject><imagedata fileref="../images/5_2_unique_values.png" format="PNG" scale="&imgscale;"/></imageobject>
1279 <imageobject><imagedata fileref="./images/5_2_unique_values.eps" format="EPS" scale="&imgscale;"/></imageobject>
1280 </mediaobject>
1281 </figure>
1282 </para>
1283 <para>
1284 The Uniform Distribution option creates a user specified number of
1285 groups of ranges such that each range covers equal intervals. The
1286 minimum and maximum values can automatically be retrieved from the
1287 table by clicking <guibutton>Retrieve From Table</guibutton>. The
1288 stepping is how large each interval is. Adjusting this value will
1289 automatically recalculate how many groups is appropriate.
1290 <figure>
1291 <title>Uniform Distribution</title>
1292 <mediaobject>
1293 <imageobject><imagedata fileref="../images/5_2_uniform_dist.png" format="PNG" scale="&imgscale;"/></imageobject>
1294 <imageobject><imagedata fileref="./images/5_2_uniform_dist.eps" format="EPS" scale="&imgscale;"/></imageobject>
1295 </mediaobject>
1296 </figure>
1297 </para>
1298 <para>
1299 The Quantiles option generates ranges based on the number of items
1300 in the table. For example, by specifying five groups Thuban will
1301 generate five groups with appropriate ranges such that 20% of the table
1302 data is in each group. If it is impossible to generate exact
1303 groupings, Thuban will issue a warning but allow the user to continue.
1304 <figure>
1305 <title>Quantiles</title>
1306 <mediaobject>
1307 <imageobject><imagedata fileref="../images/5_2_quantiles.png" format="PNG" scale="&imgscale;"/></imageobject>
1308 <imageobject><imagedata fileref="./images/5_2_quantiles.eps" format="EPS" scale="&imgscale;"/></imageobject>
1309 </mediaobject>
1310 </figure>
1311 </para>
1312 </section>
1313 </chapter>
1314
1315 <chapter><title>Projection Management</title>
1316 <para>
1317 Projections control how the geographic data is displayed on the screen.
1318 If multiple layers are loaded into Thuban where the geographic data
1319 is in a different projection system, then the user must specify a
1320 projection for each layer. The user must also tell Thuban which
1321 projection the map is in. This can be the same as the layers or a different
1322 projection in which case the layers are reprojected into that space.
1323 The map projection can be set using
1324 <menuchoice>
1325 <guimenu>Map</guimenu>
1326 <guimenuitem>Projection</guimenuitem>
1327 </menuchoice> and the layer projection can be set using
1328 <menuchoice>
1329 <guimenu>Layer</guimenu>
1330 <guimenuitem>Projection</guimenuitem>
1331 </menuchoice>.
1332 <figure>
1333 <title>Projection Window</title>
1334 <mediaobject>
1335 <imageobject><imagedata fileref="../images/6_projection.png" format="PNG" scale="&imgscale;"/></imageobject>
1336 <imageobject><imagedata fileref="./images/6_projection.eps" format="EPS" scale="&imgscale;"/></imageobject>
1337 </mediaobject>
1338 </figure>
1339 </para>
1340 <para>
1341 Thuban is distributed with a sample collection of projections and the
1342 set of coordinate systems as used by the EPSG
1343 (European Petroleum Survey Group). This quite large set is only displayed
1344 if activated by the according checkbox. The set falls into two parts:
1345 deprecated lists all projections which are no longer part of the
1346 EPSG data base.
1347 </para>
1348 <para>
1349 The
1350 user can create new projections and make them available to all
1351 future Thuban sessions. They may also be exported and imported so
1352 that custom projections can be distributed.
1353 </para>
1354 <section><title>Selecting a Projection</title>
1355 <para>
1356 The available projections are listed on the left. If the layer
1357 or map already has a projection it will initially be highlighted
1358 and will end with <varname>(current)</varname>. Selecting
1359 <varname>&lt;None&gt;</varname> will cause Thuban to use the data as
1360 it appears in the source file and will not use a projection.
1361 </para>
1362 </section>
1363 <section><title>Editing a Projection</title>
1364 <para>
1365 Whenever a projection is selected from the list its properties
1366 are displayed on the right. These properties can be changed
1367 and the changes saved to the selected projection using
1368 <guibutton>Update</guibutton>. Only a projection that comes
1369 from a file can be updated, so if the current layer's projection
1370 is selected, <guibutton>Update</guibutton> will be disabled.
1371 <guibutton>Add to List</guibutton> adds the projection to the
1372 list of available projections as a new entry, and thus makes it
1373 available to future Thuban sessions. Clicking <guibutton>New</guibutton>
1374 will create an entirely new, empty projection. The
1375 <guibutton>Remove</guibutton> button will permanently remove a
1376 projection from the list of available projections.
1377 </para>
1378 <para>
1379 To apply the selected projection to the map the user can click
1380 either <guibutton>Try</guibutton> or <guibutton>OK</guibutton>.
1381 <guibutton>Try</guibutton> will not close the dialog box, allowing
1382 the user to see how the projeciton changes the map.
1383 <guibutton>Revert</guibutton> will undo the last projection applied
1384 to the map. <guibutton>OK</guibutton> will commit the changes and
1385 close the dialog. The user will be unable to undo the changes.
1386 <guibutton>Close</guibutton> simply closes the dialog box. If no
1387 selection has been applied with <guibutton>Try</guibutton> the
1388 selection will not be applied to the map.
1389 </para>
1390 </section>
1391 <section><title>Importing/Exporting Projections</title>
1392 <para>
1393 The projections that appear in the list of available projections
1394 can be exported to another file that the user chooses. By selecting
1395 one or more projections and clicking <guibutton>Export</guibutton>
1396 the user will be able to select a file in which to store those
1397 projections.
1398 The file can then be distributed to other Thuban users. To import
1399 a projection file the user can click <guibutton>Import</guibutton>.
1400 The imported projections are added to the list and are then available
1401 to the current session and any future Thuban sessions.
1402 </para>
1403 </section>
1404 </chapter>
1405
1406 <chapter><title>Tabellen-Management</title>
1407 <para>
1408 Thuban unterscheidet zwei unterschiedliche Tabellen-Typen:
1409 Attributtabellen (welche zu einer Ebene gehört) sowie normale
1410 Datentabellen.
1411 Beide bieten die gleiche allgemeine Funktionalität mit dem
1412 einzigen Unterschied, dass Aktionen auf einer Attributtabelle
1413 die Kartendarstellung ändern können.
1414 </para>
1415
1416 <section><title>Tabellen-Ansicht</title>
1417 <para>
1418 <figure>
1419 <title>Tabellen-Ansicht</title>
1420 <mediaobject>
1421 <imageobject><imagedata fileref="../images/7_1_table_view.png" format="PNG" scale="&imgscale;"/></imageobject>
1422 <imageobject><imagedata fileref="./images/7_1_table_view.eps" format="EPS" scale="&imgscale;"/></imageobject>
1423 </mediaobject>
1424 </figure>
1425 </para>
1426 <para>
1427 Thuban stellt einen Standard-Dialog für die Anzeige einer Tabelle
1428 zur Verfügung. Diese Aansicht hat 5 Elemente:Titel, Selektion,
1429 das Tabellenraster, Exportfunktionen und die Statuszeile.
1430 </para>
1431 <para>
1432 Die Titelzeile identifiziert die Tabelle mit ihrem Namen.
1433 </para>
1434 <para>
1435 Die Selektionsbox erlaubt es dem Benutzer einfache Analysen auf den Daten
1436 durch Vergleiche durchzuführen: Die erste Auswahl ist ein Feldbezeichner
1437 der Tabelle, die zweite Auswahl bestimmt den Typ des Vergleichs.
1438 Die dritte Auswahl kann entweder ein bestimmter Wert (interpretiert
1439 als Zahl oder als Zeichenkette abhängig vom Typ des ersten Feldes)
1440 oder ein zweiter Feldbezeichner sein.
1441 D.h. man kann Analysen durchführen wie alle Einträge auswählen bei
1442 denen <literal>bevoelkerung > 10000</literal> oder
1443 <literal>pkw_pro_einwohner < fahrraeder_pro_einwohner</literal>
1444 (beachten Sie, dass die Namen nur exemplarisch sind, dBase Dateien
1445 erlauben nur Bezeichner mit einer maximalen Länge von 11 Zeichen).
1446
1447 Selektionen können kombiniert werden. Entweder bezieht sich
1448 die Selektion auf die zuvor selektierten Einträge oder man kann
1449 eine bestehende Selektion erweitern. Voreingestellt ist
1450 einersetzen der bisherigen Selektion.
1451 </para>
1452 <para>
1453 Das Tabellenraster zeigt den Inhalt der Tabelle (pro Zeile ein Eintrag).
1454 Selektionen sind hervorgehoben. Die Grösse der Zeiken und Spalten kann
1455 verändert werden.
1456 </para>
1457 <para>
1458 Der Inhalt einer Tabelle kann in eine Datei exportiert werden,
1459 entweder im dBase format (DBF) oder als kommaseparierte Werte
1460 (CSV). Der.
1461 <guibutton>Export</guibutton> Knopf startet einen Dialog
1462 zur Angabe des Pfades und des Namens der Datei.
1463 Der Export-Typ wird durch die Namenserwiterung spezifiziert
1464 (entweder .dbf oder .csv).
1465
1466 Der Knopf <guibutton>Exportiere Selektion</guibutton> funktioniert
1467 ähnlich, exportiert aber nur die aktuelle Selektion.
1468
1469 Der <guibutton>Schliessen</guibutton> Knopf schliesst das
1470 Fenster mit der Tabellenansicht. Dies ist nicht zu verwechseln mit
1471 dem Menüpunkt
1472 <menuchoice>
1473 <guimenu>Tabelle</guimenu>
1474 <guimenuitem>Schliessen</guimenuitem>
1475 </menuchoice> welcher die Tabelle aus Thuban entfernt.
1476 </para>
1477 <para>
1478 Die Statuszeile zeigt einige statistische Informationen zu
1479 der Tabelle sowie zu Selektionsergebnisse an.
1480 </para>
1481 </section>
1482
1483 <section><title>Allgemeine Funktionalität (Menü Tabelle)</title>
1484 <para>
1485 Die allgemeinen Funktionen wirken sich auf alle geöffneten Tabellen
1486 aus. Attributtabellen werden wie normale Tabellen behandelt (mit der
1487 Ausnahme dass diese nicht geschlossen werden können).
1488 </para>
1489 <section><title>Öffnen</title>
1490 <para>
1491 Der Menüpunkt
1492 <menuchoice>
1493 <guimenu>Tabelle</guimenu>
1494 <guimenuitem>Öffnen</guimenuitem>
1495 </menuchoice>
1496 startet einen Dateiselektionsdialog für die Auswahl
1497 einer dBase-Datei. Diese wird als nur-lesbar in Thuban
1498 geladen.
1499 Mit <guibutton>OK</guibutton> wird die ausgewählte Datei
1500 geladen und eine entsprechende Tabellenansicht geöffnet.
1501 </para>
1502 </section>
1503
1504 <section><title>Schliessen</title>
1505 <para>
1506 Der Menüpunkt
1507 <menuchoice>
1508 <guimenu>Tabelle</guimenu>
1509 <guimenuitem>Schliessen</guimenuitem>
1510 </menuchoice>
1511 startet einen Dialog welcher alle derzeit geöffneten Datentabellen
1512 (die geladen wurden über
1513 <menuchoice>
1514 <guimenu>Tabelle</guimenu>
1515 <guimenuitem>Öffnen</guimenuitem>
1516 </menuchoice>).
1517 Die gewählten Tabellen werden nach Bestätigung aus Thuban
1518 entfernt.
1519 Da die Tabellen als nur-lesend geöffnet wurden, wird
1520 der Inhalt der Tabellen nicht verändert.
1521
1522 Sämtliche offenen Tabellenansichten für diese
1523 Tabellen werden ebenfalls geschlossen.
1524
1525 Tabellen die bei Verknüpfungen verwendet werden
1526 können nicht geschlossen werden.
1527 </para>
1528 </section>
1529
1530 <section><title>Umbenennen</title>
1531 <para>
1532 <menuchoice>
1533 <guimenu>Tabelle</guimenu>
1534 <guimenuitem>Umbenennen</guimenuitem>
1535 </menuchoice> ändert den Tabellentitel.
1536 </para>
1537 </section>
1538
1539 <section><title>Anzeigen</title>
1540 <para>
1541 Der Menüpunkt
1542 <menuchoice>
1543 <guimenu>Tabelle</guimenu>
1544 <guimenuitem>Anzeigen</guimenuitem>
1545 </menuchoice>
1546 öffnet einen Dialog mit der Liste der verfügbaren
1547 Tabellen (explizit geladene Tabellen, Attributtabellen,
1548 Ergebnisse aus Verknüpfungen).
1549 Die ausgewählten Tabellen werden nach der
1550 Bestätigung mit
1551 <guibutton>OK</guibutton> in Tabellenansichten dargestellt..
1552 </para>
1553 </section>
1554
1555 <section><title>Join</title>
1556 <para>
1557 <figure>
1558 <title>Join Tables</title>
1559 <mediaobject>
1560 <imageobject><imagedata fileref="../images/7_2_5_join.png" format="PNG" scale="&imgscale;"/></imageobject>
1561 <imageobject><imagedata fileref="./images/7_2_5_join.eps" format="EPS" scale="&imgscale;"/></imageobject>
1562 </mediaobject>
1563 </figure>
1564 </para>
1565 <para>
1566 The
1567 <menuchoice>
1568 <guimenu>Table</guimenu>
1569 <guimenuitem>Join</guimenuitem>
1570 </menuchoice>
1571 item raises a dialog to specify the two tables to be
1572 joined. The join results in a new table named 'Join of "left table"
1573 and "right table"'.
1574
1575 The dialog lets you select the two tables to be joined and the two
1576 fields the join has to be performed on. By default, the new
1577 table contains only those records which are matched by the join.
1578
1579 If you want to preserve the records of the left table you can
1580 perform an outer join. The fields from the right table for records
1581 not matched by the join are filled with <varname>None</varname> in
1582 this case.
1583 </para>
1584 </section>
1585
1586 </section>
1587 <section><title>Attribute Tables</title>
1588 <para>
1589 To clearly separate between both types of tables (data and
1590 attribute), Thuban provides functionality regarding the attribute
1591 tables under the <menuchoice><guimenu>Layer</guimenu></menuchoice> menu.
1592 </para>
1593
1594 <section><title>Show Table</title>
1595 <para>
1596 <menuchoice>
1597 <guimenu>Layer</guimenu>
1598 <guimenuitem>Show Table</guimenuitem>
1599 </menuchoice>
1600 opens the attribute table of the currently active layer in a table
1601 view.
1602
1603 In addition to the functionality described above selections
1604 affect also the map display: objects related to selected records
1605 are highlighted.
1606 </para>
1607 </section>
1608
1609 <section><title>Join Table</title>
1610 <para>
1611 Unlike the join described above, the join does not result in a
1612 new table. The attribute table of the currently active layer is the
1613 left table and other tables are joined to this table. The results of
1614 the join are available for classification.
1615
1616 As a consequence, the join cannot result in fewer
1617 records than the source attribute table. The user is warned if the
1618 right table does not fulfill this constraint. An outer join must be
1619 used in such cases.
1620 </para>
1621 </section>
1622
1623 <section><title>Unjoin Table</title>
1624 <para>
1625 As said above, a normal table cannot be closed while it is still
1626 used in a join. While the joined table resulting from a join of
1627 normal tables can be simply closed (and thereby dereferencing
1628 the source tables), this is not possible for attribute tables.
1629
1630 Hence joins on attribute tables must be solved explicitly. This is
1631 what the
1632 <menuchoice>
1633 <guimenu>Layer</guimenu>
1634 <guimenuitem>Unjoin Table</guimenuitem>
1635 </menuchoice>
1636 item is used for: The last join for the currently
1637 active layer is solved.
1638 </para>
1639 </section>
1640 </section>
1641 </chapter>
1642
1643 <chapter><title>Extensions</title>
1644 <para>
1645 Thuban is designed to be extensible. The term Extension is used as a
1646 general term for anything that extends Thuban.
1647 This chapter introduces into some oppportunities how to add and
1648 handle extra functionality developed by your own or third parties.
1649 </para>
1650
1651 <section><title>Add personal extensions via thubanstart.py</title>
1652 <para>
1653 After Thuban has been started for the first time, a directory
1654 .thuban is created within your home directory.
1655 There you can add a file thubanstart.py which will be imported
1656 by Thuban at start-up. It is recommended to add only import-statements
1657 to this file to keep the actual code of extensions separate.
1658 </para>
1659 <para>
1660 The modules to import must either be found through the environment
1661 variable PYTHONPATH or directly be placed into the .thuban-directory.
1662 </para>
1663 <para>
1664 As an example, copy the file examples/simple_extensions/hello_world.py
1665 of the Thuban source code into the .thuban-directory of your home
1666 directory. Now add add the statement import hello_world to the
1667 file thubanstart.py and run Thuban. You will notice an additional
1668 menu <menuchoice><guimenu>Extensions</guimenu></menuchoice> where
1669 the new item for the Hello-World extension is placed - select it
1670 to see the Hello-World message.
1671 </para>
1672 </section>
1673
1674 <section><title>Extensions included in Thuban package</title>
1675 <para>
1676 The extensions described in this section are part of the
1677 Thuban package, but not activated by default.
1678 You will find them in the Thuban installation directory
1679 under <literal>Extensions/</literal>. Activate them as personal
1680 extensions via PYTHONPATH as described in the previous section.
1681 Stable extensions will appear under the menu
1682 <menuchoice><guimenu>Extensions</guimenu></menuchoice> and
1683 extensions which are in experimental state and therefore
1684 not fully functional under
1685 <menuchoice><guimenu>Experimental</guimenu></menuchoice>.
1686 </para>
1687
1688 <section><title>Stable extensions</title>
1689 <para>
1690 These extensions provide extra-functionality to Thuban
1691 that has not (yet) been integrated in the main application.
1692 They are considered to be free of bugs, but may be
1693 further polished with helpful user interactions.
1694 </para>
1695 <section><title>gns2shp</title>
1696 <para>
1697 This tool converts data of the Geospatial Names Server
1698 (GNS, see <ulink url="http://www.nima.mil/gns"/>)
1699 into Shapefile format.
1700 The above web-site offer to download named places
1701 information grouped by countries for all of the world
1702 except USA for which other data are provided.
1703 </para>
1704 <para>
1705 If you download and unpack a package, you will have
1706 a text-file with suffix .txt.
1707 Selecting such a file via gns2shp will create the
1708 corresponding Shapefile with the same basename and
1709 place it in the same direcory. Afterwards it
1710 is automatically loaded into Thuban.
1711 The Shapefile will not automatically be delete afterwards.
1712 </para>
1713 <para>
1714 The gns2shp.py module can also be executed on the
1715 command line for batch processing purposes.
1716 </para>
1717 <para>
1718 A sample (<literal>ls.txt</literal> for Liechtenstein)
1719 is included in the directory
1720 <literal>Extensions/gns2shp/test</literal>.
1721 </para>
1722 </section>
1723 <section><title>SVG Export</title>
1724 <para>
1725 Map and legend can be exported separately in the
1726 Thuban-Map-SVG format.
1727 You get files that comply with
1728 the Scalable Vector Graphics (SVG) 1.1 Specification
1729 and can be read by many vector drawing applications.
1730 </para>
1731 <para>
1732 Goal of svgexport is to provide
1733 the start of a printing pipeline for Thuban.
1734 For this purpose the written Thuban-Map-SVG files
1735 contain information that can be used in postprocessing.
1736 Typically a general vector drawing application is
1737 more powerful then a geographic information viewer;
1738 e.g. having much fancier symbols and fonts.
1739 Also users benefit much more when learning to use a
1740 more general application they can also use for other
1741 tasks. So the charming idea is to enable
1742 the drawing application to postprocess a Thuban maps.
1743 So thee xtra information in the format will make it
1744 possible to export from Thuban and if a few geoobjects
1745 change, and keep the general layout and style
1746 of the full map in the vector drawing appplication.
1747 </para>
1748 <para>
1749 Markus Rechtien has developed a prototype of this
1750 printing pipline as his Diplom thetis, showing
1751 the feasability of Bernhard Reiter's concept.
1752 Scripts exist for the drawing application Skencil
1753 (<ulink url="http://www.skencil.org"/>).
1754 </para>
1755 <para>
1756 Technical notes: the names of the layers are used
1757 as base for ids within the SVG format.
1758 If you try to export with two layers having
1759 the same name, you will get a name clash error.
1760 Just change one of the layer names and try again.
1761 </para>
1762 </section>
1763 </section>
1764 <section><title>Experimental extensions</title>
1765 <para>
1766 All all of these functions have to be handled with care,
1767 since they are neither complete nor well tested.
1768 They are to be seen as a proof-of-concept and may
1769 additionally in some cases of practical help.
1770 </para>
1771 <para>
1772 Any interest on further improvement of these extensions
1773 should be communicated towards the developer and user
1774 community.
1775 </para>
1776
1777 <section><title>importAPR</title>
1778 <para>
1779 This command offer to load an ESRI® ArcView® project
1780 file (suffix .apr) and convert it for use within Thuban.
1781 After selecting a apr-file to load, a list
1782 will be presented that offers to select one of the views
1783 of the apr-file, provided there is more than one.
1784 Furthermore, the Session Info-Tree is extended with
1785 a complete representation of the parsed apr-file.
1786 </para>
1787 <para>
1788 The legend of Thuban does not yet cover all of the elements as
1789 supported by the legend of ArcView®. Therefore, the Thuban
1790 map will look different. Furthermore, the apr-format is
1791 a proprietary format, not openly documented.
1792 Therefore, the interpretation is
1793 partly based on reverse engeneering and good guessing.
1794 </para>
1795 <para>
1796 The file-paths within the apr-file may not fit and potentially
1797 are subject to fix in the apr-file. You can do this
1798 applying any text editor. The paths are either absolute
1799 or relative from where Thuban has been started.
1800 </para>
1801 <para>
1802 A sample for the Iceland data is included as
1803 <literal>Extensions/importAPR/samples/iceland.apr</literal>.
1804 The file-paths are relative from the Thuban main directory.
1805 </para>
1806 </section>
1807 </section>
1808 </section>
1809
1810 <section><title>Writing simple extensions</title>
1811 <para>
1812 Writing an extension for Thuban basically means to
1813 implement the extra functionality in Python with all of the
1814 Thuban classes, methods and variables available.
1815 </para>
1816 <para>
1817 All classes and their methods are documented in the source code
1818 (see their doc-strings). Here is an example from
1819 Thuban/Model/layer.py that describes some of the methods
1820 of a Layer object:
1821 </para>
1822 <programlisting>
1823 <![CDATA[
1824 class BaseLayer(TitledObject, Modifiable):
1825
1826 """Base class for the layers."""
1827
1828 def __init__(self, title, visible = True, projection = None):
1829 """Initialize the layer.
1830
1831 title -- the title
1832 visible -- boolean. If true the layer is visible.
1833 """
1834 TitledObject.__init__(self, title)
1835 Modifiable.__init__(self)
1836 self.visible = visible
1837 self.projection = projection
1838
1839 def Visible(self):
1840 """Return true if layer is visible"""
1841 return self.visible
1842
1843 def SetVisible(self, visible):
1844 """Set the layer's visibility."""
1845 self.visible = visible
1846 self.issue(LAYER_VISIBILITY_CHANGED, self)
1847
1848 def HasClassification(self):
1849 """Determine if this layer support classifications."""
1850 ...
1851 ]]>
1852 </programlisting>
1853 <para>
1854 This example intends to give you an impression of the
1855 source-code-level documentation.
1856 You have to make yourself familiar with
1857 the Python programming language to understand some special
1858 code elements.
1859 </para>
1860 <section><title>hello_world.py</title>
1861 <para>
1862 Traditionally, the first example should welcome the world.
1863 Most of the code handles the frame for integrating a menu
1864 item into Thuban while the actual raising of a message
1865 is done in a single line.
1866 </para>
1867 <programlisting>
1868 <![CDATA[
1869 # Copyright (C) 2003 by Intevation GmbH
1870 # Authors:
1871 # Jan-Oliver Wagner <[email protected]>
1872 #
1873 # This program is free software under the GPL (>=v2)
1874 # Read the file COPYING coming with Thuban for details.
1875
1876 """
1877 Extend Thuban with a sample Hello World to demonstrate simple
1878 extensions.
1879 """
1880
1881 __version__ = '$Revision$'
1882
1883 # use _() already now for all strings that may later be translated
1884 from Thuban import _
1885
1886 # Thuban has named commands which can be registered in the central
1887 # instance registry.
1888 from Thuban.UI.command import registry, Command
1889
1890 # The instance of the main menu of the Thuban application
1891 # See Thuban/UI/menu.py for the API of the Menu class
1892 from Thuban.UI.mainwindow import main_menu
1893
1894 def hello_world_dialog(context):
1895 """Just raise a simple dialog to greet the world.
1896
1897 context -- The Thuban context.
1898 """
1899 context.mainwindow.RunMessageBox(_('Hello World'), _('Hello World!'))
1900
1901
1902 # create a new command and register it
1903 registry.Add(Command('hello_world', _('Hello World'), hello_world_dialog,
1904 helptext = _('Welcome everyone on this planet')))
1905
1906 # find the extensions menu (create it anew if not found)
1907 extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
1908
1909 # finally bind the new command with an entry in the extensions menu
1910 extensions_menu.InsertItem('hello_world')
1911 ]]>
1912 </programlisting>
1913 </section>
1914 <section><title>Registering a Command</title>
1915 <para>
1916 Mainly, our new function has to be registered to the Thuban
1917 framework in order to connect it to the menu. A registered
1918 command can also be connected to e.g. a toolbar button.
1919 </para>
1920 <para>
1921 The instances and classes for this are imported at the beginning.
1922 Any code not inside a method or class is directly executed when
1923 the source-code module is imported. Therefore, the second
1924 part of this example consist of the plain statements to create a new
1925 Command and to add it to the menu.
1926 </para>
1927 <para>
1928 By convention, it looks for a menu registered as ``extensions'' to
1929 insert the new command. If it does not exist yet, it gets created.
1930 It is advisable to copy this code for any of your extensions.
1931 </para>
1932 </section>
1933 <section><title>The Thuban context</title>
1934 <para>
1935 A registered command that is called, always receives the
1936 Thuban context. This instance provides our method with
1937 hook references to all important components of the Thuban
1938 application.
1939 </para>
1940 <para>
1941 In the example hello_world.py, our function uses the
1942 mainwindow component which offers a method to raise a
1943 message dialog. In total there are three hooks:
1944 <itemizedlist>
1945 <listitem>
1946 <para>application:
1947 This object is the instance of the Thuban Application class.
1948 Except maybe for loading or savinf sessions, you will not
1949 need this object for a simple extension.
1950 See Thuban/UI/application.py for the API.
1951 </para>
1952 </listitem>
1953 <listitem>
1954 <para>session:
1955 The instance of the current session. It manages the sessions'
1956 map and tables. You can set and remove the map or tables.
1957 In may also get the map object. However, you should know that
1958 internally it is already prepared to handle many maps.
1959 Therfore, currently you would always receive a list with exactlty
1960 one element. In the future, if there are more than one map,
1961 you will not know which one is the currently display one and
1962 therefore you should use the mainwindow as hook to find
1963 the currently displayed map.
1964 See Thuban/Model/session.py for the API.
1965 </para>
1966 </listitem>
1967 <listitem>
1968 <para>
1969 mainwindow: The mainwindow object is central to manage various
1970 GUI things such as the Legend sub-window. Most notably,
1971 you get access to the canvas which is the window part where
1972 the map is drawn. The canvas knows, which map it currently
1973 draws and therefore you get the current map via
1974 context.mainwindow.canvas.Map().
1975 See Thuban/UI/mainwindow.py for the API.
1976 </para>
1977 </listitem>
1978 </itemizedlist>
1979 </para>
1980 </section>
1981 </section>
1982 </chapter>
1983
1984 <chapter><title>Trouble Shooting</title>
1985 <para>
1986 Here are a few problems that users have encountered when first using Thuban.
1987 </para>
1988 <para>
1989
1990 <itemizedlist>
1991 <listitem>
1992 <para>After adding two or more layers nothing is drawn in the map window.
1993 </para>
1994 <para>
1995 This is probably because the layers have different projections. Projections
1996 must be set on all layers and on the map itself if the layers' projections
1997 are different.
1998 </para>
1999 </listitem>
2000
2001 <listitem>
2002 <para>Thuban crashes on startup with the error
2003 <literal>NameError: global name 'False' is not defined</literal>.
2004 </para>
2005 <para>
2006 <varname>True</varname> and <varname>False</varname> were only introduced
2007 in Python 2.2.1. Thuban depends on at least Python 2.2.1.
2008 </para>
2009 </listitem>
2010
2011 <listitem>
2012 <para>After compiling Thuban, Thuban crashes with an error similar to
2013 <literal>
2014 ImportError: /usr/local//lib/thuban/Thuban/../Lib/wxproj.so: undefined symbol: __gxx_personality_v0
2015 </literal>
2016 </para>
2017 <para>
2018 Thuban depends on the wxWindows library. If Thuban is compiled with an
2019 incompatible version of the compiler than wxWindows was compiled with
2020 this error may occur. Try compiling with a different version of the
2021 compiler.
2022 </para>
2023 </listitem>
2024 </itemizedlist>
2025 </para>
2026 <para>
2027 If an error occurs Thuban will display a dialog indicating the error
2028 before closing. The text should be copied and reported to the
2029 <ulink url="http://thuban.intevation.org/bugtracker.html">
2030 Intevation bugtracker
2031 </ulink>.
2032 More information about the system is available from
2033 <menuchoice><guimenu>Help</guimenu><guimenuitem>About</guimenuitem></menuchoice> box.
2034 This should also be included in the bug report.
2035 <figure>
2036 <title>Error Dialog</title>
2037 <mediaobject>
2038 <imageobject><imagedata fileref="../images/8_int_error.png" format="PNG" scale="&imgscale;"/></imageobject>
2039 <imageobject><imagedata fileref="./images/8_int_error.eps" format="EPS" scale="&imgscale;"/></imageobject>
2040 </mediaobject>
2041 </figure>
2042 </para>
2043
2044 </chapter>
2045
2046 <appendix><title>Supported Data Sources</title>
2047 <para>
2048 </para>
2049 <variablelist>
2050 <varlistentry>
2051 <term>Shapefile</term>
2052 <listitem>
2053 <para>
2054 The Shapefile format has become a standard format for saving
2055 geographic vector information. It supports polygons, lines, and
2056 points.
2057
2058 <ulink url="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf">
2059 Technical Specification.
2060 </ulink>
2061 </para>
2062 </listitem>
2063 </varlistentry>
2064
2065 <varlistentry>
2066 <term>dBase file</term>
2067 <listitem>
2068 <para>
2069 dBase files are used to store the attributes for each layer. This
2070 is closely associated with the Shapefile format. For detailed
2071 specifications on the correct format of a dBase file used with
2072 Thuban please see the Technical Specification for the Shapefile
2073 format above.
2074 </para>
2075 </listitem>
2076 </varlistentry>
2077
2078 <varlistentry>
2079 <term>PostGIS</term>
2080 <listitem>
2081 <para>
2082 PostGIS adds support for geographic objects to the PostgreSQL
2083 object-relational database. Different layer types (as for Shapefiles)
2084 are supported. <ulink url="http://postgis.refractions.net">PostGIS
2085 Homepage</ulink>
2086 </para>
2087 </listitem>
2088 </varlistentry>
2089
2090 <varlistentry>
2091 <term>Raster files</term>
2092 <listitem>
2093 <para>
2094 Binding the GDAL library Thuban supports numerous raster file formats,
2095 see <ulink url="http://www.remotesensing.org/gdal/formats_list.html">
2096 GDAL format list</ulink> for details.</para>
2097
2098 <para>Most commonly used is the <emphasis>TIFF/GeoTIFF</emphasis>
2099 format: Raster maps are provided as TIFF images, with an additional
2100 "world file" storing the geographic reference (usually with an
2101 extension ".tfw").
2102 </para>
2103 </listitem>
2104 </varlistentry>
2105
2106 </variablelist>
2107 </appendix>
2108
2109 <appendix><title>Working with PostGIS</title>
2110 <para>
2111 This section focusses on the use of PostGIS in the Thuban framework. For
2112 installation and maintenance of spatial databases we refer to the
2113 <ulink url="http://postgis.refractions.net">PostGIS Homepage</ulink>.
2114 The Thuban PostGIS support requires the
2115 <ulink url="http://initd.org/software/psycopg">psycopg module</ulink>.
2116 </para>
2117
2118 <para>
2119 Working with PostGIS Databases is seperated into two steps:
2120 <itemizedlist>
2121 <listitem><para>Opening a Database Connection</para></listitem>
2122 <listitem><para>Loading a Data Layer</para></listitem>
2123 </itemizedlist>
2124 </para>
2125 <section><title>Opening a Database Connection</title>
2126 <para>
2127 Before a data layer can be loaded from a PostGIS database a
2128 connection with the database has to be established.
2129 <menuchoice>
2130 <guimenu>Session</guimenu>
2131 <guimenuitem>Database Connections ...</guimenuitem>
2132 </menuchoice> opens a dialog for database connection
2133 management. In the dialog new connections can be added
2134 and existing ones can be removed. Removing a database
2135 connection is not possible if the map still displays a
2136 layer provided by this database connection.
2137 </para>
2138 <figure>
2139 <title>Database Management Dialog</title>
2140 <mediaobject>
2141 <imageobject><imagedata fileref="../images/app_postgis_db_management.png" format="PNG" scale="&imgscale;"/></imageobject>
2142 <imageobject><imagedata fileref="./images/app_postgis_db_management.eps" format="EPS" scale="&imgscale;"/></imageobject>
2143 </mediaobject>
2144 </figure>
2145
2146 <para>
2147 To add a new database connection to the session a dialog is
2148 opened to specify the relevant connection data. Enter all
2149 data relevant for your connection. If the connection fails
2150 the dialog remains open and provides some hints on the failure.
2151 </para>
2152 <figure>
2153 <title>Add Database Dialog</title>
2154 <mediaobject>
2155 <imageobject><imagedata fileref="../images/app_postgis_db_add.png" format="PNG" scale="&imgscale;"/></imageobject>
2156 <imageobject><imagedata fileref="./images/app_postgis_db_add.eps" format="EPS" scale="&imgscale;"/></imageobject>
2157 </mediaobject>
2158 </figure>
2159
2160 <para>
2161 It is important to note that information on database connections are
2162 also stored with the session. Passwords are NOT stored. If you load a
2163 session with database connections you are asked to enter these
2164 passwords again where required.
2165 </para>
2166
2167 </section>
2168
2169 <section><title>Loading a Data Layer</title>
2170 <para>
2171 Data layers as part of a map are loaded with the
2172 <menuchoice>
2173 <guimenu>Map</guimenu>
2174 <guimenuitem>Add Database Layer ...</guimenuitem>
2175 </menuchoice> menu item. A dialog is raised displaying two choice
2176 lists. In the left list all connected databases are shown.
2177 Highlighting
2178 one of these and issuing a retrieval results in a list of available
2179 layer tables from that database. After selection of a
2180 layer the dialog is closed.
2181 </para>
2182 <figure>
2183 <title>Add Database Dialog</title>
2184 <mediaobject>
2185 <imageobject><imagedata fileref="../images/app_postgis_add_layer.png" format="PNG" scale="&imgscale;"/></imageobject>
2186 <imageobject><imagedata fileref="./images/app_postgis_add_layer.eps" format="EPS" scale="&imgscale;"/></imageobject>
2187 </mediaobject>
2188 </figure>
2189
2190 </section>
2191
2192 </appendix>
2193
2194 <appendix><title>Supported Projections</title>
2195 <para>
2196 The following types of projections are directly support by
2197 Thuban. The specific values for each are provided by the user
2198 to create custom projections. Thuban comes with predefined
2199 projections which are available through the Projections dialog.
2200 </para>
2201 <itemizedlist>
2202 <listitem>
2203 <para>Geographic</para>
2204 <itemizedlist>
2205 <listitem><para><literal>Ellipsoid</literal></para></listitem>
2206 <listitem><para>
2207 <literal>Source Data</literal>: either Degrees or Radians
2208 </para></listitem>
2209 </itemizedlist>
2210 </listitem>
2211 <listitem>
2212 <para>Lambert Conic Conformal</para>
2213 <itemizedlist>
2214 <listitem><para><literal>Ellipsoid</literal></para></listitem>
2215 <listitem><para><literal>Latitude of 1st standard parallel</literal></para></listitem>
2216 <listitem><para><literal>Latitude of 2nd standard parallel</literal></para></listitem>
2217 <listitem><para><literal>Central Meridian</literal></para></listitem>
2218 <listitem><para><literal>Latitude of Origin</literal></para></listitem>
2219 <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
2220 <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
2221 </itemizedlist>
2222 </listitem>
2223 <listitem>
2224 <para>Transverse Mercator</para>
2225 <itemizedlist>
2226 <listitem><para><literal>Ellipsoid</literal></para></listitem>
2227 <listitem><para><literal>Latitude</literal>of origin</para></listitem>
2228 <listitem><para><literal>Longitude</literal>at central meridian</para></listitem>
2229 <listitem><para><literal>Scale Factor</literal>at central meridian</para></listitem>
2230 <listitem><para><literal>False Easting</literal> (meters)</para></listitem>
2231 <listitem><para><literal>False Northing</literal> (meters)</para></listitem>
2232 </itemizedlist>
2233 </listitem>
2234 <listitem>
2235 <para>Universal Transverse Mercator</para>
2236 <itemizedlist>
2237 <listitem><para><literal>Ellipsoid</literal></para></listitem>
2238 <listitem><para><literal>Zone</literal>
2239 (can be guessed appling the Propose button)</para></listitem>
2240 <listitem><para><literal>Southern Hemisphere</literal> flag</para></listitem>
2241 </itemizedlist>
2242 </listitem>
2243 </itemizedlist>
2244
2245 <para>
2246 Thuban comes with a sample set of map projections for various
2247 European countries. Apart from the basic projection they differ
2248 especially in their parameterization:
2249 </para>
2250 <itemizedlist>
2251 <listitem><para>Belgium Datum 1972 (Lambert Conic Conformal)</para>
2252 </listitem>
2253
2254 <listitem><para>Gauss-Boaga Zone 1 (Italy, Transverse Mercartor)</para>
2255 </listitem>
2256
2257 <listitem><para>Gauss-Krueger Zone 2 (Germany, Transverse Mercartor)
2258 </para>
2259 </listitem>
2260
2261 <listitem><para>Reseau Geodesique Francaise
2262 (France, Lambert Conic Conformal)</para>
2263 </listitem>
2264
2265 <listitem><para>UK National Grid (United Kingdom, Transverse Mercartor)
2266 </para>
2267 </listitem>
2268 </itemizedlist>
2269
2270 <para>
2271 Thuban uses the comprehensive PROJ library for projections. PROJ provides
2272 more than the four commonly used projections described above. If needed
2273 Thuban can be easily extended to a new projection covered by PROJ.
2274 </para>
2275 </appendix>
2276
2277 </book>
2278

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26